[core,update] return if gdi is NULL

This commit is contained in:
akallabeth 2024-04-21 12:34:39 +02:00 committed by akallabeth
parent db09d1d7f8
commit a95426e7c4

View File

@ -3331,7 +3331,9 @@ BOOL update_begin_paint(rdpUpdate* update)
/* Reset the invalid regions, we start a new frame here. */
rdpGdi* gdi = update->context->gdi;
WINPR_ASSERT(gdi);
if (!gdi)
return FALSE;
if (gdi->hdc && gdi->primary && gdi->primary->hdc)
{
HGDI_WND hwnd = gdi->primary->hdc->hwnd;