diff --git a/src/event-loop.c b/src/event-loop.c index 9790cde..4a17016 100644 --- a/src/event-loop.c +++ b/src/event-loop.c @@ -285,6 +285,9 @@ wl_event_loop_add_idle(struct wl_event_loop *loop, wl_event_loop_idle_func_t func, void *data) { + if (loop == NULL) + return NULL; + struct wl_event_source_idle *source; source = malloc(sizeof *source);