Browse Source

VST: Fixed a potential crash when resizing host window asynchronously

tags/2021-05-28
ed 5 years ago
parent
commit
133dc99b51
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 7
- 1
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -2896,7 +2896,13 @@ public:
setScaleFactorAndDispatchMessage (peer->getPlatformScaleFactor());
#if JUCE_LINUX
MessageManager::callAsync ([this] { componentMovedOrResized (true, true); });
SafePointer<VSTPluginWindow> safeThis (this);
MessageManager::callAsync ([this, safeThis]
{
if (safeThis != nullptr)
componentMovedOrResized (true, true);
});
#else
componentMovedOrResized (true, true);
#endif


Loading…
Cancel
Save