Fixed minor bug - wait for event queue condition IF the queue is empty, not WHILE...
authorPhilip Chimento <philip.chimento@gmail.com>
Sun, 25 Oct 2009 11:48:35 +0000 (11:48 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Sun, 25 Oct 2009 11:48:35 +0000 (11:48 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@150 ddfedd41-794f-dd11-ae45-00112f111e67

libchimara/event.c

index 5da6dd8e5058c60f97dbcbfaad265167ee36c561..88b09f02c1f31ce0fba2dfec6c35e2eb2f15432b 100644 (file)
@@ -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);