Author: tkreuzer
Date: Thu Aug 2 10:06:08 2012
New Revision: 57028
URL:
http://svn.reactos.org/svn/reactos?rev=57028&view=rev
Log:
[WIN32K]
Return non-null value when a dc without a bitmap selected is passed to
NtGdiSetDIBitsToDeviceInternal
Modified:
trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Thu Aug 2 10:06:08 2012
@@ -433,6 +433,8 @@
goto Exit2;
}
+ ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
+
pDC = DC_LockDc(hDC);
if (!pDC)
{
@@ -440,16 +442,21 @@
goto Exit2;
}
- pSurf = pDC->dclevel.pSurface;
- if ((pDC->dctype == DC_TYPE_INFO) || !pSurf)
+ if (pDC->dctype == DC_TYPE_INFO)
{
DC_UnlockDc(pDC);
goto Exit2;
}
+ pSurf = pDC->dclevel.pSurface;
+ if (!pSurf)
+ {
+ DC_UnlockDc(pDC);
+ ret = ScanLines;
+ goto Exit2;
+ }
+
pDestSurf = &pSurf->SurfObj;
-
- ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan);
rcDest.left = XDest;
rcDest.top = YDest;