- Move the check for a NULL dc higher (before it's actually used). Fixes crashes (in FireFox, for example).

svn path=/trunk/; revision=30920
This commit is contained in:
Aleksey Bragin 2007-11-30 20:19:25 +00:00
parent d2a8cdcae5
commit 88abaa75d9

View file

@ -23,6 +23,8 @@ 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;
}
@ -40,7 +42,6 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
case GdiBCSetBrushOrg:
{
PGDIBSSETBRHORG pgSBO;
if (!dc) break;
pgSBO = (PGDIBSSETBRHORG) pHdr;
Dc_Attr->ptlBrushOrigin = pgSBO->ptlBrushOrigin;
break;