diff --git a/reactos/subsystems/win32/win32k/objects/gdibatch.c b/reactos/subsystems/win32/win32k/objects/gdibatch.c index 2772a16cea5..da0a8a348cf 100644 --- a/reactos/subsystems/win32/win32k/objects/gdibatch.c +++ b/reactos/subsystems/win32/win32k/objects/gdibatch.c @@ -23,10 +23,11 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr) if (hDC) { dc = DC_LockDc(hDC); - if (!dc) - return pHdr->Size; // Return the full size of the structure. - Dc_Attr = dc->pDc_Attr; - if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr; + if (dc) + { + Dc_Attr = dc->pDc_Attr; + if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr; + } } // The thread is approaching the end of sunset. switch(pHdr->Cmd)