Skip to content

Commit

Permalink
Do not draw if begin paint fails
Browse files Browse the repository at this point in the history
  • Loading branch information
hdlx committed Aug 30, 2024
1 parent 6d8a6d5 commit fdd3be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/App.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,8 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_PAINT:
{
PAINTSTRUCT ps;
BeginPaint(hwnd, &ps);
if (BeginPaint(hwnd, &ps) == NULL)
return 0;
RECT clientRect;
ASSERT(GetClientRect(hwnd, &clientRect));
SGraphicsResources* pGraphRes = &_AppData._GraphicsResources;
Expand Down

0 comments on commit fdd3be5

Please sign in to comment.