From 134e84afc1e0fa3725e41dff781536a05ef724ff Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 24 May 2011 13:26:12 +0000 Subject: Solved possible crash because windows window disappears in the middle of a function call --- xorg-server/hw/xwin/winmultiwindowwm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c index fae132329..015192070 100644 --- a/xorg-server/hw/xwin/winmultiwindowwm.c +++ b/xorg-server/hw/xwin/winmultiwindowwm.c @@ -1685,6 +1685,11 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle) if (hint & HINT_NOMAXIMIZE) style = style & ~WS_MAXIMIZEBOX; + if (!IsWindow (hWnd)) + { + ErrorF("Windows window 0x%x has become invalid, so returning without applying hints\n",hWnd); + return; + } if (winMultiWindowGetWMNormalHints(pWin, &SizeHints)) { -- cgit v1.2.3