Bug fixes
authorPhilip Chimento <philip.chimento@gmail.com>
Thu, 3 Dec 2009 22:04:26 +0000 (22:04 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Thu, 3 Dec 2009 22:04:26 +0000 (22:04 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@198 ddfedd41-794f-dd11-ae45-00112f111e67

libchimara/chimara-glk.c
tests/glulxercise.c
tests/glulxercise.ui

index 0fabb3943eabe4d6823d04a07dddc15165070e8d..93f95c73cb400a3d57d68b3e137b561a104ad664 100644 (file)
@@ -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
index a389d8948d0a16b857b04767c9e6826e7945b731..b5d3513265de9d9182f0345a237e57dcfc5e5c0f 100644 (file)
@@ -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)
 {
index 934e67791e685c2b4433a502738d37592df00f66..5ca17ae40dbc9802027ad45f8085dc6b492ce12a 100644 (file)
@@ -4,7 +4,7 @@
   <!-- interface-naming-policy project-wide -->
   <object class="GtkWindow" id="window">
     <property name="border_width">6</property>
-    <signal name="destroy" handler="gtk_main_quit"/>
+    <signal name="delete_event" handler="on_window_delete_event"/>
     <child>
       <object class="GtkVBox" id="vbox">
         <property name="visible">True</property>