Remove object when test plugin unloads
authorAndy Spencer <andy753421@gmail.com>
Tue, 10 Jan 2012 07:21:35 +0000 (07:21 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 10 Jan 2012 07:21:35 +0000 (07:21 +0000)
src/plugins/test.c

index 81082f4aab7d53b353a84659f48166a51ba6fc70..51be90ef88c04cbb796923315c4b741f5e2453b3 100644 (file)
@@ -189,6 +189,8 @@ static void grits_plugin_test_dispose(GObject *_test)
        GritsPluginTest *test = GRITS_PLUGIN_TEST(_test);
        if (test->viewer) {
                grits_viewer_remove(test->viewer, GRITS_OBJECT(test->marker));
+               grits_viewer_remove(test->viewer, GRITS_OBJECT(test->poly));
+               grits_viewer_remove(test->viewer, GRITS_OBJECT(test->line));
                g_object_unref(test->viewer);
                test->viewer = NULL;
        }