mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:26:00 +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
|
||||
GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
||||
{
|
||||
PDC dc = DC_LockDc(hDC);
|
||||
if (!dc) return 0;
|
||||
// The thread is on the end of sunset.
|
||||
PDC dc = NULL;
|
||||
if (hDC) dc = DC_LockDc(hDC);
|
||||
// The thread is approaching the end of sunset.
|
||||
switch(pHdr->Cmd)
|
||||
{
|
||||
case GdiBCPatBlt: // Highest pri first!
|
||||
|
@ -33,6 +33,7 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
|||
break;
|
||||
case GdiBCSetBrushOrg:
|
||||
{
|
||||
if (!dc) break;
|
||||
PGDIBSSETBRHORG pgSBO = (PGDIBSSETBRHORG) pHdr;
|
||||
dc->Dc_Attr.ptlBrushOrigin = pgSBO->ptlBrushOrigin;
|
||||
break;
|
||||
|
@ -49,10 +50,9 @@ GdiFlushUserBatch(HDC hDC, PGDIBATCHHDR pHdr)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
DC_UnlockDc(dc);
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
DC_UnlockDc(dc);
|
||||
if (dc) DC_UnlockDc(dc);
|
||||
return pHdr->Size; // Return the full size of the structure.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue