summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/engine/LADSPAPlugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libs/engine/LADSPAPlugin.cpp b/src/libs/engine/LADSPAPlugin.cpp
index 1c2b397e..37d66805 100644
--- a/src/libs/engine/LADSPAPlugin.cpp
+++ b/src/libs/engine/LADSPAPlugin.cpp
@@ -39,10 +39,6 @@ LADSPAPlugin::LADSPAPlugin(const string& path, size_t poly, Patch* parent, const
_instances(NULL)
{
assert(_descriptor != NULL);
-
- // Note that this may be changed by an overriding DSSIPlugin
- // ie do not assume _ports is all LADSPA plugin ports
- _num_ports = _descriptor->PortCount;
}
@@ -57,7 +53,9 @@ LADSPAPlugin::LADSPAPlugin(const string& path, size_t poly, Patch* parent, const
bool
LADSPAPlugin::instantiate()
{
- _ports = new Array<Port*>(_num_ports);
+ // Note that a DSSI plugin might tack more on to the end of this
+ if (!_ports)
+ _ports = new Array<Port*>(_descriptor->PortCount);
_instances = new LADSPA_Handle[_poly];