mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 21:56:06 +00:00
Allow batch flush to handle null DCs.
svn path=/trunk/; revision=30145
This commit is contained in:
parent
1423476391
commit
0dc4496ea8
1 changed files with 6 additions and 6 deletions
|
@ -18,9 +18,9 @@ ULONG
|
||||||
FASTCALL
|
FASTCALL
|
||||||
GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
||||||
{
|
{
|
||||||
PDC dc = DC_LockDc(hDC);
|
PDC dc = NULL;
|
||||||
if (!dc) return 0;
|
if (hDC) dc = DC_LockDc(hDC);
|
||||||
// The thread is on the end of sunset.
|
// The thread is approaching the end of sunset.
|
||||||
switch(pHdr->Cmd)
|
switch(pHdr->Cmd)
|
||||||
{
|
{
|
||||||
case GdiBCPatBlt: // Highest pri first!
|
case GdiBCPatBlt: // Highest pri first!
|
||||||
|
@ -33,6 +33,7 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
||||||
break;
|
break;
|
||||||
case GdiBCSetBrushOrg:
|
case GdiBCSetBrushOrg:
|
||||||
{
|
{
|
||||||
|
if (!dc) break;
|
||||||
PGDIBSSETBRHORG pgSBO = (PGDIBSSETBRHORG) pHdr;
|
PGDIBSSETBRHORG pgSBO = (PGDIBSSETBRHORG) pHdr;
|
||||||
dc->Dc_Attr.ptlBrushOrigin = pgSBO->ptlBrushOrigin;
|
dc->Dc_Attr.ptlBrushOrigin = pgSBO->ptlBrushOrigin;
|
||||||
break;
|
break;
|
||||||
|
@ -49,10 +50,9 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DC_UnlockDc(dc);
|
break;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
DC_UnlockDc(dc);
|
if (dc) DC_UnlockDc(dc);
|
||||||
return pHdr->Size; // Return the full size of the structure.
|
return pHdr->Size; // Return the full size of the structure.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue