mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Added safety checks to avoid problems when windows VSTs are closed by a hooked keypress.
This commit is contained in:
parent
35a9327247
commit
58d097c855
1 changed files with 6 additions and 5 deletions
|
|
@ -2376,9 +2376,9 @@ private:
|
|||
{
|
||||
for (int i = activeVSTWindows.size(); --i >= 0;)
|
||||
{
|
||||
const VSTPluginWindow* const w = activeVSTWindows.getUnchecked (i);
|
||||
Component::SafePointer<VSTPluginWindow> w (activeVSTWindows[i]);
|
||||
|
||||
if (w->pluginHWND == hW)
|
||||
if (w != nullptr && w->pluginHWND == hW)
|
||||
{
|
||||
if (message == WM_CHAR
|
||||
|| message == WM_KEYDOWN
|
||||
|
|
@ -2391,9 +2391,10 @@ private:
|
|||
message, wParam, lParam);
|
||||
}
|
||||
|
||||
return CallWindowProc ((WNDPROC) w->originalWndProc,
|
||||
(HWND) w->pluginHWND,
|
||||
message, wParam, lParam);
|
||||
if (w != nullptr) // (may have been deleted in SendMessage callback)
|
||||
return CallWindowProc ((WNDPROC) w->originalWndProc,
|
||||
(HWND) w->pluginHWND,
|
||||
message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue