1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

VST3 Client: Disallow creating a new editor if one editor is already active

This commit is contained in:
reuk 2021-03-08 15:36:50 +00:00
parent 3afaaa48be
commit e0306d25d4
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -927,11 +927,13 @@ public:
{
if (auto* pluginInstance = getPluginInstance())
{
if (pluginInstance->hasEditor() && name != nullptr
&& strcmp (name, Vst::ViewType::kEditor) == 0)
{
const auto mayCreateEditor = pluginInstance->hasEditor()
&& name != nullptr
&& std::strcmp (name, Vst::ViewType::kEditor) == 0
&& pluginInstance->getActiveEditor() == nullptr;
if (mayCreateEditor)
return new JuceVST3Editor (*this, *pluginInstance);
}
}
return nullptr;