diff options
author | David Robillard <d@drobilla.net> | 2015-02-16 22:56:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-16 22:56:53 +0000 |
commit | d4ce698948b6d3aa18e692138e8d4392219aa187 (patch) | |
tree | 456623d10091919e2f08658cb1922bad3e45da7a /src | |
parent | 30d685b0856a73066bc7bd288dfa0923e8c73446 (diff) | |
download | ganv-d4ce698948b6d3aa18e692138e8d4392219aa187.tar.gz ganv-d4ce698948b6d3aa18e692138e8d4392219aa187.tar.bz2 ganv-d4ce698948b6d3aa18e692138e8d4392219aa187.zip |
Destroy embedded widget on module destruction.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5579 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/module.c | 9 |
1 files changed, 5 insertions, 4 deletions
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"); } } |