mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[0.4.9][WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint.
Fixes BSODs CORE-15569, CORE-12963, CORE-13410
For non-technicians:
Author Thomas Faber just imprisons the BSODs into an artificial cage
made of curly-braces. The BSODs can't h(a)unt any users anymore
and inevitably starve therefore.
cherry picked from commit 0.4.12-dev-338-g
b2dcb8e0d8
This commit is contained in:
parent
d351b32bdb
commit
995d69c8d7
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue