Unref UI manager when done
authorPhilip Chimento <philip.chimento@gmail.com>
Fri, 11 Sep 2009 21:55:05 +0000 (21:55 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Fri, 11 Sep 2009 21:55:05 +0000 (21:55 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@118 ddfedd41-794f-dd11-ae45-00112f111e67

tests/main.c

index d7f09bb52c1e236d00d20ab27f57510ef8202c08..62adca94cdecd58e4c24028f2c83c47866a7234a 100644 (file)
@@ -101,7 +101,7 @@ create_window(void)
        for(ptr = actions; *ptr; ptr += 2)
                gtk_action_group_add_action_with_accel(actiongroup, GTK_ACTION(load_object(ptr[0])), ptr[1]);
 
        for(ptr = actions; *ptr; ptr += 2)
                gtk_action_group_add_action_with_accel(actiongroup, GTK_ACTION(load_object(ptr[0])), ptr[1]);
 
-       GtkUIManager *uimanager = gtk_ui_manager_new();
+       uimanager = gtk_ui_manager_new();
        if( !gtk_ui_manager_add_ui_from_file(uimanager, "chimara.menus", &error) ) {
                error_dialog(NULL, error, "Error while building interface: ");
                return;
        if( !gtk_ui_manager_add_ui_from_file(uimanager, "chimara.menus", &error) ) {
                error_dialog(NULL, error, "Error while building interface: ");
                return;
@@ -155,6 +155,7 @@ main(int argc, char *argv[])
        gtk_widget_show_all(window);
 
        g_object_unref( G_OBJECT(builder) );
        gtk_widget_show_all(window);
 
        g_object_unref( G_OBJECT(builder) );
+       g_object_unref( G_OBJECT(uimanager) );
 
     if( !chimara_glk_run(CHIMARA_GLK(glk), "../interpreters/frotz/.libs/frotz.so", argc, argv, &error) ) {
                error_dialog(GTK_WINDOW(window), error, "Error starting Glk library: ");
 
     if( !chimara_glk_run(CHIMARA_GLK(glk), "../interpreters/frotz/.libs/frotz.so", argc, argv, &error) ) {
                error_dialog(GTK_WINDOW(window), error, "Error starting Glk library: ");