summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-02-12 22:10:52 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-02-12 22:10:52 +0100
commit83b4143391d0ef55c95f733b5f364d5f1778d68a (patch)
tree43e57dc0fdd3de52e4591e7d4a929eeb6d393471
parenteeb71aad1cfa28233a930440cc87030977d2b7f9 (diff)
Don't crash if no input port has been connected.
-rw-r--r--lv2/input_lv2.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lv2/input_lv2.cc b/lv2/input_lv2.cc
index 7c3c6ec..e70d293 100644
--- a/lv2/input_lv2.cc
+++ b/lv2/input_lv2.cc
@@ -66,6 +66,11 @@ void InputLV2::pre()
event_t *InputLV2::run(size_t pos, size_t len, size_t *nevents)
{
+ if(eventPort == NULL) {
+ *nevents = 0;
+ return NULL;
+ }
+
event_t *list;
size_t listsize;