From 4a69939aa814d0f4b8568c42a512e4764e66ee6d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 13 Feb 2001 01:49:06 +0000 Subject: [PATCH] Don't crash on close from window manager. --- controls/menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controls/menu.c b/controls/menu.c index 70269547849..0b8969021d0 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -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