Fixes accessing nullptr / invalid handle in Window->SystemMenu
I could trigger this occasionally when moving Opera 12.18 window
in front of Spotify 1.0.29.92 window.
Fix was:
authored by Thomas Faber (Thank you!)
tested by me
reviewed by James Tabor
fix picked from 0.4.11-dev-195-g
ef016bfe0a9dc3cc7924671277b44884e39d89d5
else
{
Menu = Window->SystemMenu ? UserGetMenuObject(Window->SystemMenu) : NULL;
- if ((!Window->SystemMenu || Menu->fFlags & MNF_SYSDESKMN) && Window->style & WS_SYSMENU)
+ if ((!Menu || Menu->fFlags & MNF_SYSDESKMN) && Window->style & WS_SYSMENU)
{
Menu = MENU_GetSystemMenu(Window, NULL);
Window->SystemMenu = Menu ? UserHMGetHandle(Menu) : NULL;