From e1c98002c99cbb68c5155959de38af8b31a5399c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Apr 2012 23:25:27 +0000 Subject: Fix crash when un-embedding plugin UI. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@4268 a436a847-0d15-0410-975c-d299462d15a1 --- ganv/Module.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ganv/Module.hpp b/ganv/Module.hpp index 9b294c9..4943295 100644 --- a/ganv/Module.hpp +++ b/ganv/Module.hpp @@ -109,7 +109,11 @@ public: } void embed(Gtk::Widget* widget) { - ganv_module_embed(gobj(), widget->gobj()); + if (widget) { + ganv_module_embed(gobj(), widget->gobj()); + } else { + ganv_module_embed(gobj(), NULL); + } } void for_each_port(GanvPortFunction f, void* data) { -- cgit v1.2.1