[ros-diffs] [jgardou] 52365: [GDI32] - remove useless check.

jgardou at svn.reactos.org jgardou at svn.reactos.org
Sun Jun 19 13:11:40 UTC 2011


Author: jgardou
Date: Sun Jun 19 13:11:39 2011
New Revision: 52365

URL: http://svn.reactos.org/svn/reactos?rev=52365&view=rev
Log:
[GDI32]
  - remove useless check.

Modified:
    trunk/reactos/dll/win32/gdi32/objects/bitmap.c

Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bitmap.c?rev=52365&r1=52364&r2=52365&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Sun Jun 19 13:11:39 2011
@@ -679,31 +679,27 @@
 #endif
     cjBmpScanSize = DIB_BitmapMaxBitsSize((LPBITMAPINFO)lpbmi, ScanLines);
 
-    if ( Bits )
-    {
-        pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize);
-        if (pvSafeBits)
-        {
-            _SEH2_TRY
-            {
-                RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize);
-            }
-            _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-            {
-                Hit = TRUE;
-            }
-            _SEH2_END
-
-            if (Hit)
-            {
-                // We don't die, we continue on with a allocated safe pointer to kernel
-                // space.....
-                DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %x or Bits: %x & Size: %d\n",pConvertedInfo,Bits,cjBmpScanSize);
-            }
-            DPRINT("SetDIBitsToDevice Allocate Bits %d!!!\n", cjBmpScanSize);
-        }
-
-    }
+	pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize);
+	if (pvSafeBits)
+	{
+		_SEH2_TRY
+		{
+			RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize);
+		}
+		_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+		{
+			Hit = TRUE;
+		}
+		_SEH2_END
+
+		if (Hit)
+		{
+			// We don't die, we continue on with a allocated safe pointer to kernel
+			// space.....
+			DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %x or Bits: %x & Size: %d\n",pConvertedInfo,Bits,cjBmpScanSize);
+		}
+		DPRINT("SetDIBitsToDevice Allocate Bits %d!!!\n", cjBmpScanSize);
+	}
 
     if (!GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr))
     {




More information about the Ros-diffs mailing list