summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-27 20:43:17 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-27 20:43:17 +0200
commitec6db14ec5642567c6955b4483d4332d6badc942 (patch)
tree219a6cd074bd9f7615523b509570314b639805a4
parentd803ddc1ddc76735a541cb2cd392f449e2152d4a (diff)
Fix crash when running without connecting ports.
-rw-r--r--plugin/drumgizmo_plugin.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc
index 29c2306..2a7e556 100644
--- a/plugin/drumgizmo_plugin.cc
+++ b/plugin/drumgizmo_plugin.cc
@@ -274,6 +274,12 @@ void DrumGizmoPlugin::Output::run(int ch, sample_t *samples, size_t nsamples)
return;
}
+ if((*plugin.output_samples)[ch] == nullptr)
+ {
+ // Port not connected.
+ return;
+ }
+
// We are not running directly on the internal buffer: do a copy.
if((*plugin.output_samples)[ch] != samples)
{