summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-28 21:36:16 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-02 14:08:20 +0200
commitb8eb36a333684694f95388a6a57742d3ae1c5fe4 (patch)
treea4e560f57d5ae61f2fd9ec5411cb6047dd8866dc
parentforcepoint#40 null deref (diff)
downloadcore-b8eb36a333684694f95388a6a57742d3ae1c5fe4.tar.gz
core-b8eb36a333684694f95388a6a57742d3ae1c5fe4.zip
forcepoint#41 null deref
Change-Id: I16e9e083811c6e14861da1ba1df7d46e8c8771d7 Reviewed-on: https://gerrit.libreoffice.org/54974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 0a2035492c66bc323d84ad6c2c4cbc0dc3c9d9aa)
-rw-r--r--drawinglayer/source/texture/texture3d.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx
index a3915d5f290d..127cb71b729b 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -75,8 +75,6 @@ namespace drawinglayer
mbIsTransparent(maBitmapEx.IsTransparent())
{
// #121194# Todo: use alpha channel, too (for 3d)
- mpReadBitmap = maBitmapEx.GetBitmap().AcquireReadAccess();
- OSL_ENSURE(mpReadBitmap, "GeoTexSvxBitmapEx: Got no read access to Bitmap (!)");
if(mbIsTransparent)
{
@@ -93,8 +91,13 @@ namespace drawinglayer
mpReadTransparence = maTransparence.AcquireReadAccess();
}
- mfMulX = (double)mpReadBitmap->Width() / maSize.getX();
- mfMulY = (double)mpReadBitmap->Height() / maSize.getY();
+ mpReadBitmap = maBitmapEx.GetBitmap().AcquireReadAccess();
+ SAL_WARN_IF(!mpReadBitmap, "drawinglayer", "GeoTexSvxBitmapEx: Got no read access to Bitmap");
+ if (mpReadBitmap)
+ {
+ mfMulX = static_cast<double>(mpReadBitmap->Width()) / maSize.getX();
+ mfMulY = static_cast<double>(mpReadBitmap->Height()) / maSize.getY();
+ }
if(maSize.getX() <= 1.0)
{