Do not check for a system menu on the NULL window

svn path=/trunk/; revision=30388
This commit is contained in:
Hervé Poussineau 2007-11-12 13:36:34 +00:00
parent fe683582db
commit 233f55f44f

View file

@ -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))