From c42dc3251f0c04e73c37f21989ebef97860ace34 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 13 Oct 2007 22:47:24 +0000 Subject: 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 --- src/libs/engine/LADSPANode.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libs/engine/LADSPANode.cpp') diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp index f8ecb1f5..24661a3d 100644 --- a/src/libs/engine/LADSPANode.cpp +++ b/src/libs/engine/LADSPANode.cpp @@ -47,6 +47,15 @@ LADSPANode::LADSPANode(PluginImpl* plugin, const string& path, bool polyphonic, } +LADSPANode::~LADSPANode() +{ + for (uint32_t i=0; i < _polyphony; ++i) + _descriptor->cleanup((*_instances)[i]); + + delete _instances; +} + + bool LADSPANode::prepare_poly(uint32_t poly) { @@ -204,15 +213,6 @@ LADSPANode::instantiate() } -LADSPANode::~LADSPANode() -{ - for (uint32_t i=0; i < _polyphony; ++i) - _descriptor->cleanup((*_instances)[i]); - - delete[] _instances; -} - - void LADSPANode::activate() { -- cgit v1.2.1