From 3f4244aafc702de3312267eb4f06922ef5a17b02 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 7 Jun 2008 12:58:48 +0000 Subject: [PATCH] - Cleanup leftovers and bugs from GreatLord's fix. I think this is my last "postfix" of GreatLord's commits to trunk. svn path=/trunk/; revision=33886 --- reactos/subsystems/win32/win32k/objects/dibobj.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index 039656f93fe..4fbdd612c74 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -806,10 +806,13 @@ NtGdiStretchDIBitsInternal( 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) { hPal = NtGdiGetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE); @@ -859,10 +862,8 @@ NtGdiStretchDIBitsInternal( if(hPal) GdiSelectPalette(hdcMem, hPal, FALSE); - if (hOldBitmap != NULL) - { - NtGdiSelectBitmap(hdcMem, hOldBitmap); - } + if (hOldBitmap) + NtGdiSelectBitmap(hdcMem, hOldBitmap); NtGdiDeleteObjectApp(hdcMem);