Don't crash on close from window manager.
This commit is contained in:
parent
5bcef61fba
commit
4a69939aa8
@ -2766,6 +2766,8 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
|
|||||||
while (!fEndMenu)
|
while (!fEndMenu)
|
||||||
{
|
{
|
||||||
menu = MENU_GetMenu( mt.hCurrentMenu );
|
menu = MENU_GetMenu( mt.hCurrentMenu );
|
||||||
|
if (!menu) /* sometimes happens if I do a window manager close */
|
||||||
|
break;
|
||||||
msg.hwnd = (wFlags & TPM_ENTERIDLEEX && menu->wFlags & MF_POPUP) ? menu->hWnd : 0;
|
msg.hwnd = (wFlags & TPM_ENTERIDLEEX && menu->wFlags & MF_POPUP) ? menu->hWnd : 0;
|
||||||
|
|
||||||
/* we have to keep the message in the queue until it's
|
/* we have to keep the message in the queue until it's
|
||||||
|
Loading…
x
Reference in New Issue
Block a user