diff options
author | Armin Le Grand <alg@apache.org> | 2012-09-06 10:28:18 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-09-06 10:28:18 +0000 |
commit | 560ab48c4b4453ffdd316d8db5dbda111f08650c (patch) | |
tree | fa6269e3cda0bbd53b47f1bdef36f0bc0afeae53 | |
parent | c66db94a90efe954691da4ac6bb1ce82ff99e22f (diff) |
assertion corrected: BitmapEx constructors with Mask or AlphaMask needed more checks
Notes
merged as: e52f636aa44615b180bf799b2d664de9244c3138
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 6 |
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()); |