From: Philip Chimento 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-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=6702e46cbf0d5980a7386038d019c03fb12d3b52;p=rodin%2Fchimara.git Fixed minor bug - wait for event queue condition IF the queue is empty, not WHILE it is empty git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@150 ddfedd41-794f-dd11-ae45-00112f111e67 --- 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);