aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-08-22 17:23:18 +0000
committerDavid Robillard <d@drobilla.net>2011-08-22 17:23:18 +0000
commit2dcab6c3e55ef00d9e9424ea6e2aeea0c78c321b (patch)
treec4f5d897e78a1b196bac643d3cf8b52b2a592c6c /src
parent4ec145604cee4e2a3d445564d2204f8243283eab (diff)
downloadjalv-2dcab6c3e55ef00d9e9424ea6e2aeea0c78c321b.tar.gz
jalv-2dcab6c3e55ef00d9e9424ea6e2aeea0c78c321b.tar.bz2
jalv-2dcab6c3e55ef00d9e9424ea6e2aeea0c78c321b.zip
Fix jalv.gtk when run with UI-less plugins.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3447 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/jalv.c6
-rw-r--r--src/jalv_gtk2.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 6a15063..c2cf3b8 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -574,8 +574,10 @@ main(int argc, char** argv)
/* Clean up */
free(host.ports);
- jack_ringbuffer_free(host.ui_events);
- jack_ringbuffer_free(host.plugin_events);
+ if (host.ui) {
+ jack_ringbuffer_free(host.ui_events);
+ jack_ringbuffer_free(host.plugin_events);
+ }
lilv_node_free(native_ui_type);
lilv_node_free(host.input_class);
lilv_node_free(host.output_class);
diff --git a/src/jalv_gtk2.c b/src/jalv_gtk2.c
index 6e4e9cd..d1a4a00 100644
--- a/src/jalv_gtk2.c
+++ b/src/jalv_gtk2.c
@@ -127,6 +127,9 @@ jalv_open_ui(Jalv* jalv,
if (instance) {
GtkWidget* widget = (GtkWidget*)suil_instance_get_widget(instance);
gtk_container_add(GTK_CONTAINER(alignment), widget);
+
+ g_timeout_add(1000 / JALV_UI_UPDATE_HZ,
+ (GSourceFunc)jalv_emit_ui_events, jalv);
} else {
GtkWidget* button = gtk_button_new_with_label("Close");
@@ -143,9 +146,6 @@ jalv_open_ui(Jalv* jalv,
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show_all(window);
- g_timeout_add(1000 / JALV_UI_UPDATE_HZ,
- (GSourceFunc)jalv_emit_ui_events, jalv);
-
gtk_main();
sem_post(jalv->done);
return 0;