From d650c46c855d71e0729cd8cffddd1063dc2b9569 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 28 Jul 2000 20:20:03 +0000 Subject: [PATCH] Do not crash if window was not found. --- windows/x11drv/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c index 9377bb30303..e8511bec1ab 100644 --- a/windows/x11drv/event.c +++ b/windows/x11drv/event.c @@ -724,7 +724,7 @@ static void EVENT_ButtonPress( HWND hWnd, XButtonEvent *event ) WIN_ReleaseWndPtr(pWnd); if (buttonNum >= NB_BUTTONS) return; - + /* * Get the compatible keystate */ @@ -1857,7 +1857,7 @@ void EVENT_MapNotify( HWND hWnd, XMapEvent *event ) void EVENT_UnmapNotify( HWND hWnd, XUnmapEvent *event ) { WND *pWnd = WIN_FindWndPtr(hWnd); - if (pWnd->flags & WIN_MANAGED) + if (pWnd && (pWnd->flags & WIN_MANAGED)) { EndMenu(); if( pWnd->dwStyle & WS_VISIBLE )