incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1381561 - /incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx
Date Thu, 06 Sep 2012 11:28:18 GMT
Author: alg
Date: Thu Sep  6 11:28:18 2012
New Revision: 1381561

URL: http://svn.apache.org/viewvc?rev=1381561&view=rev
Log:
assertion corrected: BitmapEx constructors with Mask or AlphaMask needed more checks

Modified:
    incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx

Modified: incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx?rev=1381561&r1=1381560&r2=1381561&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/bitmapex.cxx Thu Sep  6 11:28:18 2012
@@ -131,10 +131,10 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( sal_False )
 {
-    if(rBmp.GetSizePixel() != rMask.GetSizePixel())
+    if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
     {
         OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
-        aMask.Scale(rBmp.GetSizePixel());
+        aMask.Scale(aBitmap.GetSizePixel());
     }
 
     // #105489# Ensure a mask is exactly one bit deep
@@ -154,7 +154,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( !rAlphaMask ? sal_False : sal_True )
 {
-    if(rBmp.GetSizePixel() != rAlphaMask.GetSizePixel())
+    if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel())
     {
         OSL_ENSURE(false, "Alpha size differs from Bitmap size, corrected Mask (!)");
         aMask.Scale(rBmp.GetSizePixel());



Mime
View raw message