Author: fireball
Date: Fri Nov 30 23:19:25 2007
New Revision: 30920
URL:
http://svn.reactos.org/svn/reactos?rev=30920&view=rev
Log:
- Move the check for a NULL dc higher (before it's actually used). Fixes crashes (in
FireFox, for example).
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 Fri Nov 30 23:19:25 2007
@@ -23,6 +23,8 @@
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;
}
@@ -40,7 +42,6 @@
case GdiBCSetBrushOrg:
{
PGDIBSSETBRHORG pgSBO;
- if (!dc) break;
pgSBO = (PGDIBSSETBRHORG) pHdr;
Dc_Attr->ptlBrushOrigin = pgSBO->ptlBrushOrigin;
break;