diff options
author | David Robillard <d@drobilla.net> | 2011-12-29 20:16:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-29 20:16:28 +0000 |
commit | 8d726ac166de79a30e2abad4f4c3a36c23a3fe83 (patch) | |
tree | c961e14146ec48283e199f893c275377dd68bf0e /src | |
parent | e36a95bd35301c5343e593ef385f8b7573d9d606 (diff) | |
download | jalv-8d726ac166de79a30e2abad4f4c3a36c23a3fe83.tar.gz jalv-8d726ac166de79a30e2abad4f4c3a36c23a3fe83.tar.bz2 jalv-8d726ac166de79a30e2abad4f4c3a36c23a3fe83.zip |
Destroy UI instance before shutting down Gtk (fix messy shutdown).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3907 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv_gtk2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jalv_gtk2.c b/src/jalv_gtk2.c index 3b64b6d..1ddeb95 100644 --- a/src/jalv_gtk2.c +++ b/src/jalv_gtk2.c @@ -22,6 +22,9 @@ static void on_window_destroy(GtkWidget* widget, gpointer data) { + Jalv* jalv = (Jalv*)data; + suil_instance_free(jalv->ui_instance); + jalv->ui_instance = NULL; gtk_main_quit(); } @@ -178,7 +181,7 @@ jalv_open_ui(Jalv* jalv, jalv->window = window; g_signal_connect(window, "destroy", - G_CALLBACK(on_window_destroy), NULL); + G_CALLBACK(on_window_destroy), jalv); gtk_window_set_title(GTK_WINDOW(window), lilv_node_as_string(lilv_plugin_get_name(jalv->plugin))); |