friendly check for the timer's delay being > 0
Dana Jansens danakj@orodu.net
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
openbox/mainloop.c
→
openbox/mainloop.c
@@ -530,6 +530,9 @@ GEqualFunc cmp,
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;