From d660a25834d404f3bf9634998da1fe9ca92eeae0 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 1 Dec 2007 13:26:45 +0000 Subject: [PATCH] Unbreak gdi batch... Sometimes dc is null. svn path=/trunk/; revision=30931 --- reactos/subsystems/win32/win32k/objects/gdibatch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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)