summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-15 17:18:28 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-15 17:18:28 +0200
commit293dd731e9815c06ba8eca1fb83d86276103c820 (patch)
tree5a3b2f43c30b3b3e89e9c63c60eeb5fb957d94f5
parent6a35a75a6bb2753f40edf59f360130e452b3c7f0 (diff)
vcl: aAlphaBitmap.ImplGetImpBitmap() seen as 0
Change-Id: I3f34f0315045d33ff6e498e24c0dacb0aabb0ff9
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx8
-rw-r--r--vcl/source/outdev/bitmap.cxx11
2 files changed, 15 insertions, 4 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index a8c2015f93fd..e397e84cb0ae 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -298,6 +298,14 @@ void DesktopLOKTest::testPaintTile()
// 256.
pDocument->pClass->paintTile(pDocument, aBuffer.data(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+ // This crashed in OutputDevice::DrawDeviceAlphaBitmap().
+ nCanvasWidth = 200;
+ nCanvasHeight = 200;
+ nTileWidth = 4000;
+ nTileHeight = 4000;
+ aBuffer.resize(nCanvasWidth * nCanvasHeight * 4);
+ pDocument->pClass->paintTile(pDocument, aBuffer.data(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+
closeDoc();
}
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index eb342c6529b2..9834347f3698 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -670,11 +670,14 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
if (mpAlphaVDev)
{
Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aRelPt, aOutSz ) );
- SalBitmap* pSalAlphaBmp2 = aAlphaBitmap.ImplGetImpBitmap()->ImplGetSalBitmap();
- if (mpGraphics->BlendAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, *pSalAlphaBmp2, this))
+ if (aAlphaBitmap.ImplGetImpBitmap())
{
- mpAlphaVDev->BlendBitmap(aTR, rAlpha);
- return;
+ SalBitmap* pSalAlphaBmp2 = aAlphaBitmap.ImplGetImpBitmap()->ImplGetSalBitmap();
+ if (mpGraphics->BlendAlphaBitmap(aTR, *pSalSrcBmp, *pSalAlphaBmp, *pSalAlphaBmp2, this))
+ {
+ mpAlphaVDev->BlendBitmap(aTR, rAlpha);
+ return;
+ }
}
}
else