From a119af807c631ec72fe075464ac7750052746335 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Sep 2016 13:30:14 +0800 Subject: Fix crash on changes for ports with no widget This happens, for example, with latency ports with the notOnGUI property set. --- src/jalv_gtk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index b6bd9e4..82df8b4 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -669,13 +669,15 @@ jalv_ui_port_event(Jalv* jalv, uint32_t protocol, const void* buffer) { - if (protocol == 0) { + if (protocol == 0 && (Controller*)jalv->ports[port_index].widget) { control_changed(jalv, (Controller*)jalv->ports[port_index].widget, buffer_size, jalv->forge.Float, buffer); return; + } else if (protocol == 0) { + return; // No widget (probably notOnGUI) } else if (protocol != jalv->urids.atom_eventTransfer) { fprintf(stderr, "Unknown port event protocol\n"); return; -- cgit v1.2.1