mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +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)
|
if (hDC)
|
||||||
{
|
{
|
||||||
dc = DC_LockDc(hDC);
|
dc = DC_LockDc(hDC);
|
||||||
|
if (!dc)
|
||||||
|
return pHdr->Size; // Return the full size of the structure.
|
||||||
Dc_Attr = dc->pDc_Attr;
|
Dc_Attr = dc->pDc_Attr;
|
||||||
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
|
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +42,6 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
||||||
case GdiBCSetBrushOrg:
|
case GdiBCSetBrushOrg:
|
||||||
{
|
{
|
||||||
PGDIBSSETBRHORG pgSBO;
|
PGDIBSSETBRHORG pgSBO;
|
||||||
if (!dc) break;
|
|
||||||
pgSBO = (PGDIBSSETBRHORG) pHdr;
|
pgSBO = (PGDIBSSETBRHORG) pHdr;
|
||||||
Dc_Attr->ptlBrushOrigin = pgSBO->ptlBrushOrigin;
|
Dc_Attr->ptlBrushOrigin = pgSBO->ptlBrushOrigin;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue