From: fliep Date: Thu, 3 Dec 2009 22:04:26 +0000 (+0000) Subject: Bug fixes X-Git-Tag: v0.9~267 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c2e0632badcafc51a326e22e39ecf864c970aef0;p=projects%2Fchimara%2Fchimara.git Bug fixes --- diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 0fabb39..93f95c7 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -235,8 +235,10 @@ void _chimara_glk_free_window_private_data(ChimaraGlkPrivate *priv) { /* Destroy the window tree */ - trash_windows_recursive(priv, priv->root_window->data); - g_node_destroy(priv->root_window); + if(priv->root_window) { + trash_windows_recursive(priv, priv->root_window->data); + g_node_destroy(priv->root_window); + } /* Free the window arrangement signaling */ g_mutex_lock(priv->arrange_lock); @@ -244,6 +246,12 @@ _chimara_glk_free_window_private_data(ChimaraGlkPrivate *priv) g_mutex_unlock(priv->arrange_lock); g_mutex_free(priv->arrange_lock); priv->arrange_lock = NULL; + + /* Remove the dispatch callbacks */ + priv->register_obj = NULL; + priv->unregister_obj = NULL; + priv->register_arr = NULL; + priv->unregister_arr = NULL; } static void diff --git a/tests/glulxercise.c b/tests/glulxercise.c index a389d89..b5d3513 100644 --- a/tests/glulxercise.c +++ b/tests/glulxercise.c @@ -9,6 +9,13 @@ typedef struct { GtkWidget *window, *test_picker, *go, *stop, *interp; } Widgets; +gboolean +on_window_delete_event() +{ + gtk_main_quit(); + return TRUE; +} + void on_go_clicked(GtkButton *go, Widgets *w) { diff --git a/tests/glulxercise.ui b/tests/glulxercise.ui index 934e677..5ca17ae 100644 --- a/tests/glulxercise.ui +++ b/tests/glulxercise.ui @@ -4,7 +4,7 @@ 6 - + True