aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-15 13:30:14 +0800
committerDavid Robillard <d@drobilla.net>2016-09-15 13:30:14 +0800
commita119af807c631ec72fe075464ac7750052746335 (patch)
treea2667b2a1190adf361d29543beb61f397c0a2a03 /src
parentd01e0fe22184781b148e2ff2130f95f82240179f (diff)
downloadjalv-a119af807c631ec72fe075464ac7750052746335.tar.gz
jalv-a119af807c631ec72fe075464ac7750052746335.tar.bz2
jalv-a119af807c631ec72fe075464ac7750052746335.zip
Fix crash on changes for ports with no widget
This happens, for example, with latency ports with the notOnGUI property set.
Diffstat (limited to 'src')
-rw-r--r--src/jalv_gtk.c4
1 files changed, 3 insertions, 1 deletions
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;