summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-06 16:15:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-06 16:56:16 +0100
commit537469f2294742fcd770b162ad965ad1c09cd72e (patch)
tree7e2d27774dcb3faf88c7c72a0653e46951c94ac8 /vcl/source/gdi/bitmap.cxx
parentd49dcc7ccc67f5c8fbb6fa5a0d9a09aa634c588f (diff)
crashtesting: empty ReadAccess on converting fdo58541-1.xls to pdf
Change-Id: I72c74c7224e99b090eceb8928eeddc3b50d1d2c8
Diffstat (limited to 'vcl/source/gdi/bitmap.cxx')
-rw-r--r--vcl/source/gdi/bitmap.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index ec534784c3d8..6af9bcd37730 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -1109,7 +1109,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
{
ScopedReadAccess pReadAcc(const_cast<Bitmap&>(*this));
- if (!nTol && (pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitLsbPal || pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal)
+ if (!nTol && pReadAcc && (pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitLsbPal || pReadAcc->GetScanlineFormat() == ScanlineFormat::N1BitMsbPal)
&& pReadAcc->GetBestMatchingColor(Color(COL_WHITE)) == pReadAcc->GetBestMatchingColor(rTransColor))
{
//if we're a 1 bit pixel already, and the transcolor matches the color that would replace it already already, then just return a copy