Commit befff556 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Protect BeginPaint and EndPaint from lps being NULL.

parent 0485fc19
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment