Fix ref bug in plugin loader test
authorPhilip Chimento <philip.chimento@gmail.com>
Wed, 5 Jan 2011 21:49:10 +0000 (16:49 -0500)
committerPhilip Chimento <philip.chimento@gmail.com>
Wed, 5 Jan 2011 21:56:58 +0000 (16:56 -0500)
The Chimara widget should have a reference added to it.

tests/plugin-loader.c

index cb7189240a5d222a8351120c62f0fff355f94a5b..766305df5216a28a0d9eaf864ff1fcab4accbc17 100644 (file)
@@ -60,6 +60,7 @@ create_window(void)
     gtk_widget_set_size_request(window, 400, 400);
     g_signal_connect(window, "delete-event", G_CALLBACK(quit), NULL);
        glk = chimara_glk_new();
+       g_object_ref(glk);
        g_signal_connect(glk, "stopped", G_CALLBACK(gtk_main_quit), NULL);
        gtk_container_add(GTK_CONTAINER(window), glk);
 }
@@ -95,6 +96,7 @@ main(int argc, char *argv[])
 
        chimara_glk_stop(CHIMARA_GLK(glk));
        chimara_glk_wait(CHIMARA_GLK(glk));
+       g_object_unref(glk);
 
        return 0;
 }