Diff between c05f6e305778d8c3e0b0f7f60eebf420a04739db and 01e6684e8851e16ebbbf9b46f9ff073d16d2e9e7
Changed Files
| File | Additions | Deletions | Status |
| src/shared/timeout-glib.c | +5 | -1 | modified |
Full Patch
diff --git a/src/shared/timeout-glib.c b/src/shared/timeout-glib.c
index 4163bce..fd71ca4 100644
--- a/src/shared/timeout-glib.c
+++ b/src/shared/timeout-glib.c
@@ -71,8 +71,12 @@ unsigned int timeout_add(unsigned int timeout, timeout_func_t func,
void timeout_remove(unsigned int id)
{
- GSource *source = g_main_context_find_source_by_id(NULL, id);
+ GSource *source;
+ if (!id)
+ return;
+
+ source = g_main_context_find_source_by_id(NULL, id);
if (source)
g_source_destroy(source);
}