mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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:
parent
d2a8cdcae5
commit
88abaa75d9
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue