mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user