aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/jalv.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 5c62ec7..9b11d8c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,10 +2,11 @@ jalv (1.6.5) unstable;
* Add a command line argument to select a specific UI
* Explicitly support lv2:inPlaceBroken
+ * Ignore ports with nonsense lv2:control designations
* Remove Jack session support
* Support port events for ui:showInterface UIs
- -- David Robillard <d@drobilla.net> Mon, 14 Dec 2020 14:39:31 +0000
+ -- David Robillard <d@drobilla.net> Fri, 18 Dec 2020 20:45:03 +0000
jalv (1.6.4) stable;
diff --git a/src/jalv.c b/src/jalv.c
index 8f90ed3..9fc221e 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -238,7 +238,14 @@ jalv_create_ports(Jalv* jalv)
const LilvPort* control_input = lilv_plugin_get_port_by_designation(
jalv->plugin, jalv->nodes.lv2_InputPort, jalv->nodes.lv2_control);
if (control_input) {
- jalv->control_in = lilv_port_get_index(jalv->plugin, control_input);
+ const uint32_t index = lilv_port_get_index(jalv->plugin, control_input);
+ if (jalv->ports[index].type == TYPE_EVENT) {
+ jalv->control_in = index;
+ } else {
+ fprintf(stderr,
+ "warning: Non-event port %u has lv2:control designation, "
+ "ignored\n");
+ }
}
free(default_values);