Browse Source

Fix VST3 cleanup order, component should be last

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.4.1
falkTX 3 years ago
parent
commit
0da56ee014
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp

+ 7
- 4
source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp View File

@@ -1588,7 +1588,7 @@ struct VST3ComponentHolder
~VST3ComponentHolder()
{
terminate();
terminate(true);
}
// transfers ownership to the plugin instance!
@@ -1731,7 +1731,7 @@ struct VST3ComponentHolder
return true;
}
void terminate()
void terminate(bool release)
{
if (isComponentInitialised)
{
@@ -1739,7 +1739,8 @@ struct VST3ComponentHolder
isComponentInitialised = false;
}
component = nullptr;
if (release)
component = nullptr;
}
//==============================================================================
@@ -1944,7 +1945,7 @@ public:
if (isControllerInitialised)
editController->terminate();
holder->terminate();
holder->terminate(false);
componentConnection = nullptr;
editControllerConnection = nullptr;
@@ -1957,6 +1958,8 @@ public:
midiMapping = nullptr;
editController2 = nullptr;
editController = nullptr;
holder->terminate(true);
}
//==============================================================================


Loading…
Cancel
Save