Do not crash if window was not found.

This commit is contained in:
Dmitry Timoshkov 2000-07-28 20:20:03 +00:00 committed by Alexandre Julliard
parent 52146f62fd
commit d650c46c85
1 changed files with 2 additions and 2 deletions
windows/x11drv

View File

@ -724,7 +724,7 @@ static void EVENT_ButtonPress( HWND hWnd, XButtonEvent *event )
WIN_ReleaseWndPtr(pWnd); WIN_ReleaseWndPtr(pWnd);
if (buttonNum >= NB_BUTTONS) return; if (buttonNum >= NB_BUTTONS) return;
/* /*
* Get the compatible keystate * Get the compatible keystate
*/ */
@ -1857,7 +1857,7 @@ void EVENT_MapNotify( HWND hWnd, XMapEvent *event )
void EVENT_UnmapNotify( HWND hWnd, XUnmapEvent *event ) void EVENT_UnmapNotify( HWND hWnd, XUnmapEvent *event )
{ {
WND *pWnd = WIN_FindWndPtr(hWnd); WND *pWnd = WIN_FindWndPtr(hWnd);
if (pWnd->flags & WIN_MANAGED) if (pWnd && (pWnd->flags & WIN_MANAGED))
{ {
EndMenu(); EndMenu();
if( pWnd->dwStyle & WS_VISIBLE ) if( pWnd->dwStyle & WS_VISIBLE )