From d4ce698948b6d3aa18e692138e8d4392219aa187 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Feb 2015 22:56:53 +0000 Subject: Destroy embedded widget on module destruction. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5579 a436a847-0d15-0410-975c-d299462d15a1 --- src/module.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/module.c b/src/module.c index 654dbe5..550ee48 100644 --- a/src/module.c +++ b/src/module.c @@ -83,6 +83,11 @@ ganv_module_destroy(GtkObject* object) impl->ports = NULL; } + if (impl->embed_item) { + g_object_unref(GTK_OBJECT(impl->embed_item)); + impl->embed_item = NULL; + } + if (GTK_OBJECT_CLASS(parent_class)->destroy) { (*GTK_OBJECT_CLASS(parent_class)->destroy)(object); } @@ -547,8 +552,6 @@ ganv_module_add(GanvItem* item, GanvItem* child) { if (GANV_IS_PORT(child)) { ganv_module_add_port(GANV_MODULE(item), GANV_PORT(child)); - } else { - fprintf(stderr, "warning: Non-port item added to module.\n"); } } @@ -557,8 +560,6 @@ ganv_module_remove(GanvItem* item, GanvItem* child) { if (GANV_IS_PORT(child)) { ganv_module_remove_port(GANV_MODULE(item), GANV_PORT(child)); - } else { - fprintf(stderr, "warning: Non-port item removed from module.\n"); } } -- cgit v1.2.1