1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

VST3 Host: Only call IPlugView::removed() if a previous call to attached() succeeded

This commit is contained in:
reuk 2022-02-07 20:15:47 +00:00
parent 92f350e617
commit a3c55a967f
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -1365,7 +1365,9 @@ struct VST3PluginWindow : public AudioProcessorEditor,
embeddedComponent.removeClient();
#endif
warnOnFailure (view->removed());
if (attachedCalled)
warnOnFailure (view->removed());
warnOnFailure (view->setFrame (nullptr));
processor.editorBeingDeleted (this);
@ -1573,7 +1575,12 @@ private:
return;
}
warnOnFailure (view->attached ((void*) pluginHandle, defaultVST3WindowType));
const auto attachedResult = view->attached ((void*) pluginHandle, defaultVST3WindowType);
ignoreUnused (warnOnFailure (attachedResult));
if (attachedResult == kResultOk)
attachedCalled = true;
updatePluginScale();
}
}
@ -1641,7 +1648,7 @@ private:
#endif
HandleFormat pluginHandle = {};
bool recursiveResize = false, isInOnSize = false;
bool recursiveResize = false, isInOnSize = false, attachedCalled = false;
ComponentPeer* currentPeer = nullptr;
Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr;