summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-09-06 10:28:18 +0000
committerArmin Le Grand <alg@apache.org>2012-09-06 10:28:18 +0000
commit560ab48c4b4453ffdd316d8db5dbda111f08650c (patch)
treefa6269e3cda0bbd53b47f1bdef36f0bc0afeae53
parentc66db94a90efe954691da4ac6bb1ce82ff99e22f (diff)
assertion corrected: BitmapEx constructors with Mask or AlphaMask needed more checks
Notes
-rw-r--r--vcl/source/gdi/bitmapex.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index b6ca1b76a21a..f5e37bdce759 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -131,10 +131,10 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
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, const AlphaMask& rAlphaMask ) :
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());