projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0be98fe
)
friendly check for the timer's delay being > 0
author
Dana Jansens
<danakj@orodu.net>
Wed, 16 Jan 2008 15:31:12 +0000
(10:31 -0500)
committer
Dana Jansens
<danakj@orodu.net>
Wed, 16 Jan 2008 15:31:12 +0000
(10:31 -0500)
openbox/mainloop.c
patch
|
blob
|
history
diff --git
a/openbox/mainloop.c
b/openbox/mainloop.c
index
f78f5b1
..
b292120
100644
(file)
--- a/
openbox/mainloop.c
+++ b/
openbox/mainloop.c
@@
-530,6
+530,9
@@
void ob_main_loop_timeout_add(ObMainLoop *loop,
GDestroyNotify notify)
{
ObMainLoopTimer *t = g_new(ObMainLoopTimer, 1);
+
+ g_assert(microseconds > 0); /* if it's 0 it'll cause an infinite loop */
+
t->delay = microseconds;
t->func = handler;
t->data = data;