Author: jimtabor
Date: Mon Nov 5 05:25:43 2007
New Revision: 30145
URL:
http://svn.reactos.org/svn/reactos?rev=30145&view=rev
Log:
Allow batch flush to handle null DCs.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c Mon Nov 5 05:25:43 2007
@@ -18,9 +18,9 @@
FASTCALL
GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
{
- PDC dc = DC_LockDc(hDC);
- if (!dc) return 0;
- // The thread is on the end of sunset.
+ PDC dc = NULL;
+ if (hDC) dc = DC_LockDc(hDC);
+ // The thread is approaching the end of sunset.
switch(pHdr->Cmd)
{
case GdiBCPatBlt: // Highest pri first!
@@ -33,6 +33,7 @@
break;
case GdiBCSetBrushOrg:
{
+ if (!dc) break;
PGDIBSSETBRHORG pgSBO = (PGDIBSSETBRHORG) pHdr;
dc->Dc_Attr.ptlBrushOrigin = pgSBO->ptlBrushOrigin;
break;
@@ -49,10 +50,9 @@
break;
}
default:
- DC_UnlockDc(dc);
- return 0;
+ break;
}
- DC_UnlockDc(dc);
+ if (dc) DC_UnlockDc(dc);
return pHdr->Size; // Return the full size of the structure.
}