X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fabort.c;h=8eb21dae91d53aaa13966624f1914def01037d00;hp=28e33fae444c5d85e64b29232d3b08d58b99572e;hb=c95e6ba792808e19fdf241eab61f2b571cfe6933;hpb=cccf5a5fb76599e4c5dffaae34ec6bda6229f554 diff --git a/libchimara/abort.c b/libchimara/abort.c index 28e33fa..8eb21da 100644 --- a/libchimara/abort.c +++ b/libchimara/abort.c @@ -143,7 +143,13 @@ shutdown_glk_post(void) /* Empty the event queue */ g_mutex_lock(glk_data->event_lock); g_queue_foreach(glk_data->event_queue, (GFunc)g_free, NULL); - g_queue_clear(glk_data->event_queue); + + /* COMPAT: g_queue_clear could be used here, but only appeared in 2.14 */ + // g_queue_clear(glk_data->event_queue); + g_list_free(glk_data->event_queue->head); + glk_data->event_queue->head = glk_data->event_queue->tail = NULL; + glk_data->event_queue->length = 0; + g_mutex_unlock(glk_data->event_lock); /* Reset the abort signaling mechanism */