Protect BeginPaint and EndPaint from lps being NULL.
This commit is contained in:
parent
0485fc19b6
commit
befff55609
|
@ -159,6 +159,8 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
|||
HWND full_handle;
|
||||
WND *wndPtr;
|
||||
|
||||
if (!lps) return 0;
|
||||
|
||||
if (!(full_handle = WIN_IsCurrentThread( hwnd )))
|
||||
{
|
||||
if (IsWindow(hwnd))
|
||||
|
@ -239,6 +241,8 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
|||
*/
|
||||
BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
|
||||
{
|
||||
if (!lps) return FALSE;
|
||||
|
||||
ReleaseDC( hwnd, lps->hdc );
|
||||
ShowCaret( hwnd );
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue