aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwndproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 4e836fa06..eb2b51020 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -363,6 +363,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
fWMMsgInitialized = TRUE;
}
+ else if (message!=WM_CREATE)
+ { // Avoid crashes when pWin == NULL, which happens sometimes (I think during closing of windows)
+ return DefWindowProc (hwnd, message, wParam, lParam);
+ }
/* Branch on message type */
switch (message)