mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 21:48:19 +00:00
[NtGDI] Fix leaking of bitmaps while testing INFO DC's.
Soon to be commit test for metafiles. ret = MaskBlt(hdc, 0, 0, 3, 4, dib_hdc, 0, 0, mask_bitmap, 0, 0, SRCCOPY);
This commit is contained in:
parent
8767aada75
commit
d9f8b8b033
1 changed files with 4 additions and 0 deletions
|
@ -385,6 +385,7 @@ NtGdiMaskBlt(
|
||||||
if (!GDIOBJ_bLockMultipleObjects(2, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
|
if (!GDIOBJ_bLockMultipleObjects(2, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
|
||||||
{
|
{
|
||||||
WARN("Invalid dc handle (dest=0x%p, src=0x%p) passed to NtGdiMaskBlt\n", hdcDest, hdcSrc);
|
WARN("Invalid dc handle (dest=0x%p, src=0x%p) passed to NtGdiMaskBlt\n", hdcDest, hdcSrc);
|
||||||
|
if(psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -396,6 +397,7 @@ NtGdiMaskBlt(
|
||||||
{
|
{
|
||||||
if(DCSrc) DC_UnlockDc(DCSrc);
|
if(DCSrc) DC_UnlockDc(DCSrc);
|
||||||
WARN("Invalid destination dc handle (0x%p) passed to NtGdiMaskBlt\n", hdcDest);
|
WARN("Invalid destination dc handle (0x%p) passed to NtGdiMaskBlt\n", hdcDest);
|
||||||
|
if(psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,6 +406,7 @@ NtGdiMaskBlt(
|
||||||
if(DCSrc) DC_UnlockDc(DCSrc);
|
if(DCSrc) DC_UnlockDc(DCSrc);
|
||||||
DC_UnlockDc(DCDest);
|
DC_UnlockDc(DCDest);
|
||||||
/* Yes, Windows really returns TRUE in this case */
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
if(psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,6 +418,7 @@ NtGdiMaskBlt(
|
||||||
DC_UnlockDc(DCDest);
|
DC_UnlockDc(DCDest);
|
||||||
DC_UnlockDc(DCSrc);
|
DC_UnlockDc(DCSrc);
|
||||||
/* Yes, Windows really returns TRUE in this case */
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
if(psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue