Author: fireball
Date: Sat Jun 7 07:58:48 2008
New Revision: 33886
URL:
http://svn.reactos.org/svn/reactos?rev=33886&view=rev
Log:
- Cleanup leftovers and bugs from GreatLord's fix. I think this is my last
"postfix" of GreatLord's commits to trunk.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Sat Jun 7
07:58:48 2008
@@ -806,9 +806,12 @@
DPRINT1("NtGdiCreateCompatibleBitmap fail create bitmap\n");
DPRINT1("hDC : 0x%08x \n", hDC);
DPRINT1("BitsInfo->bmiHeader.biWidth : 0x%08x \n",
BitsInfo->bmiHeader.biWidth);
- DPRINT1("BitsInfo->bmiHeader.biWidth : 0x%08x \n",
BitsInfo->bmiHeader.biHeight);
+ DPRINT1("BitsInfo->bmiHeader.biHeight : 0x%08x \n",
BitsInfo->bmiHeader.biHeight);
return 0;
}
+
+ /* Select the bitmap into hdcMem, and save a handle to the old bitmap */
+ hOldBitmap = NtGdiSelectBitmap(hdcMem, hBitmap);
if(Usage == DIB_PAL_COLORS)
{
@@ -859,10 +862,8 @@
if(hPal)
GdiSelectPalette(hdcMem, hPal, FALSE);
- if (hOldBitmap != NULL)
- {
- NtGdiSelectBitmap(hdcMem, hOldBitmap);
- }
+ if (hOldBitmap)
+ NtGdiSelectBitmap(hdcMem, hOldBitmap);
NtGdiDeleteObjectApp(hdcMem);