Don't crash on close from window manager.

This commit is contained in:
Marcus Meissner 2001-02-13 01:49:06 +00:00 committed by Alexandre Julliard
parent 5bcef61fba
commit 4a69939aa8
1 changed files with 2 additions and 0 deletions

View File

@ -2766,6 +2766,8 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
while (!fEndMenu)
{
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;
/* we have to keep the message in the queue until it's