From: fliep Date: Sun, 25 Oct 2009 11:48:35 +0000 (+0000) Subject: Fixed minor bug - wait for event queue condition IF the queue is empty, not WHILE... X-Git-Tag: v0.9~315 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=a547d7c1b896ecae9afe07273dfb0fc744a84cb8;p=projects%2Fchimara%2Fchimara.git Fixed minor bug - wait for event queue condition IF the queue is empty, not WHILE it is empty --- diff --git a/libchimara/event.c b/libchimara/event.c index 5da6dd8..88b09f0 100644 --- a/libchimara/event.c +++ b/libchimara/event.c @@ -76,7 +76,7 @@ glk_select(event_t *event) g_mutex_lock(glk_data->event_lock); /* Wait for an event */ - while( g_queue_is_empty(glk_data->event_queue) ) + if( g_queue_is_empty(glk_data->event_queue) ) g_cond_wait(glk_data->event_queue_not_empty, glk_data->event_lock); event_t *retrieved_event = g_queue_pop_tail(glk_data->event_queue);