From e360392489fe62dbae1f0c28b7f5fb839851f5f6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 6 Mar 2017 18:59:56 +0100 Subject: Fix crash when run with disconnected control/notify ports --- src/server/ControlBindings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 57d037c3..424e451e 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -389,7 +389,7 @@ ControlBindings::pre_process(RunContext& context, Buffer* buffer) const Ingen::URIs& uris = world->uris(); _feedback->clear(); - if (!_learn_binding && _bindings->empty()) { + if ((!_learn_binding && _bindings->empty()) || !buffer->get()) { return; // Don't bother reading input } @@ -417,7 +417,9 @@ ControlBindings::pre_process(RunContext& context, Buffer* buffer) void ControlBindings::post_process(RunContext& context, Buffer* buffer) { - buffer->append_event_buffer(_feedback.get()); + if (buffer->get()) { + buffer->append_event_buffer(_feedback.get()); + } } } // namespace Server -- cgit v1.2.1