diff options
author | David Robillard <d@drobilla.net> | 2007-10-13 22:47:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-13 22:47:24 +0000 |
commit | c42dc3251f0c04e73c37f21989ebef97860ace34 (patch) | |
tree | 14f54ceef6b2bf6bbb4ed4f2101f6eda8761f1f0 /src/libs/engine/LV2Node.cpp | |
parent | 1c92f8782006264e94dd25a650841f72f91650cf (diff) | |
download | ingen-c42dc3251f0c04e73c37f21989ebef97860ace34.tar.gz ingen-c42dc3251f0c04e73c37f21989ebef97860ace34.tar.bz2 ingen-c42dc3251f0c04e73c37f21989ebef97860ace34.zip |
Fix crash on destroying LADSPA nodes.
Tolerate MIDI with double notes (ie two note-ons with no note-off in between).
git-svn-id: http://svn.drobilla.net/lad/ingen@884 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/LV2Node.cpp')
-rw-r--r-- | src/libs/engine/LV2Node.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp index eb8f86b7..d901176f 100644 --- a/src/libs/engine/LV2Node.cpp +++ b/src/libs/engine/LV2Node.cpp @@ -55,6 +55,15 @@ LV2Node::LV2Node(PluginImpl* plugin, } +LV2Node::~LV2Node() +{ + for (uint32_t i=0; i < _polyphony; ++i) + slv2_instance_free((*_instances)[i]); + + delete _instances; +} + + bool LV2Node::prepare_poly(uint32_t poly) { @@ -193,15 +202,6 @@ LV2Node::instantiate() } -LV2Node::~LV2Node() -{ - for (uint32_t i=0; i < _polyphony; ++i) - slv2_instance_free((*_instances)[i]); - - delete _instances; -} - - void LV2Node::activate() { |