[WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. CORE-15569
authorThomas Faber <thomas.faber@reactos.org>
Tue, 8 Jan 2019 10:26:26 +0000 (11:26 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Tue, 8 Jan 2019 10:27:33 +0000 (11:27 +0100)
win32ss/user/ntuser/nonclient.c

index 44476f8..8f45582 100644 (file)
@@ -1148,11 +1148,13 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
         FillRect(hDC, &TempRect, IntGetSysColorBrush(COLOR_BTNFACE));
 
         if (Parent)
+        {
            IntGetClientRect(Parent, &ParentClientRect);
 
-        if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect))
-        {
-           DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
+           if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect))
+           {
+              DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
+           }
         }
 
         IntDrawScrollBar(pWnd, hDC, SB_VERT);