Kaydet (Commit) 560ab48c authored tarafından Armin Le Grand's avatar Armin Le Grand

assertion corrected: BitmapEx constructors with Mask or AlphaMask needed more checks

üst c66db94a
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment