mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 17:35:07 +00:00
[WIN32K]
Return non-null value when a dc without a bitmap selected is passed to NtGdiSetDIBitsToDeviceInternal svn path=/trunk/; revision=57028
This commit is contained in:
parent
98cdc21f7c
commit
cb9175370c
|
@ -433,6 +433,8 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
goto Exit2;
|
goto Exit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
|
||||||
|
|
||||||
pDC = DC_LockDc(hDC);
|
pDC = DC_LockDc(hDC);
|
||||||
if (!pDC)
|
if (!pDC)
|
||||||
{
|
{
|
||||||
|
@ -440,16 +442,21 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
goto Exit2;
|
goto Exit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
pSurf = pDC->dclevel.pSurface;
|
if (pDC->dctype == DC_TYPE_INFO)
|
||||||
if ((pDC->dctype == DC_TYPE_INFO) || !pSurf)
|
|
||||||
{
|
{
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
goto Exit2;
|
goto Exit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDestSurf = &pSurf->SurfObj;
|
pSurf = pDC->dclevel.pSurface;
|
||||||
|
if (!pSurf)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(pDC);
|
||||||
|
ret = ScanLines;
|
||||||
|
goto Exit2;
|
||||||
|
}
|
||||||
|
|
||||||
ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
|
pDestSurf = &pSurf->SurfObj;
|
||||||
|
|
||||||
rcDest.left = XDest;
|
rcDest.left = XDest;
|
||||||
rcDest.top = YDest;
|
rcDest.top = YDest;
|
||||||
|
|
Loading…
Reference in a new issue