diff options
author | David Robillard <d@drobilla.net> | 2017-03-06 18:59:56 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-06 18:59:56 +0100 |
commit | e360392489fe62dbae1f0c28b7f5fb839851f5f6 (patch) | |
tree | 482b0656fdff64866b62daaadf424381746dcfd5 /src/server | |
parent | ba3f964aacaf5280c27ea8ed582afb01676a350c (diff) | |
download | ingen-e360392489fe62dbae1f0c28b7f5fb839851f5f6.tar.gz ingen-e360392489fe62dbae1f0c28b7f5fb839851f5f6.tar.bz2 ingen-e360392489fe62dbae1f0c28b7f5fb839851f5f6.zip |
Fix crash when run with disconnected control/notify ports
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/ControlBindings.cpp | 6 |
1 files 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<LV2_Atom>()) { 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<LV2_Atom>()) { + buffer->append_event_buffer(_feedback.get()); + } } } // namespace Server |