From 233f55f44f4e3e439f575f79233c138faa56a665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 12 Nov 2007 13:36:34 +0000 Subject: [PATCH] Do not check for a system menu on the NULL window svn path=/trunk/; revision=30388 --- reactos/subsystems/win32/win32k/ntuser/painting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/painting.c b/reactos/subsystems/win32/win32k/ntuser/painting.c index ebc4da2f22a..cb48e73dbb9 100644 --- a/reactos/subsystems/win32/win32k/ntuser/painting.c +++ b/reactos/subsystems/win32/win32k/ntuser/painting.c @@ -1821,7 +1821,7 @@ BOOL UserDrawCaption( ButtonWidth = UserGetSystemMetrics(SM_CXSMSIZE) - 2; else ButtonWidth = UserGetSystemMetrics(SM_CXSIZE) - 2; - if(pWnd->Style & WS_SYSMENU) + if ((pWnd != NULL) && (pWnd->Style & WS_SYSMENU)) { r.right -= 3 + ButtonWidth; if(! (uFlags & DC_SMALLCAP))