aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;