Skip to content

Commit ec2f30d

Browse files
ThFabbaJoachimHenze
authored andcommitted
[0.4.11] [WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint.
Fixes BSODs CORE-15569, CORE-12963, CORE-13410 cherry picked from commit 0.4.12-dev-338-g b2dcb8e
1 parent b5fef42 commit ec2f30d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

win32ss/user/ntuser/nonclient.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,11 +1148,13 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
11481148
FillRect(hDC, &TempRect, IntGetSysColorBrush(COLOR_BTNFACE));
11491149

11501150
if (Parent)
1151+
{
11511152
IntGetClientRect(Parent, &ParentClientRect);
11521153

1153-
if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect))
1154-
{
1155-
DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
1154+
if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect))
1155+
{
1156+
DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
1157+
}
11561158
}
11571159

11581160
IntDrawScrollBar(pWnd, hDC, SB_VERT);

0 commit comments

Comments
 (0)