diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 21:03:18 +0100 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:34 -0500 |
commit | 46ee2cf56b343881fb80fe58ecfe5601088996c0 (patch) | |
tree | 8c3e04f3985758f8420495eead172e120e87b95a | |
parent | c576b0e88bf036e5e37f13db72685e74e81b8c41 (diff) |
ofz#984 better match post-creation aBitmap.HasGreyPalette() logic
i.e. Bitmap::HsGreyPalette checks that the palette has entries before calling
Palette::IsGreyPalette
Change-Id: I287647869ad615327f3119b7798f410e22140302
(cherry picked from commit 81894a5f7200b4c4233e407163b7f1b00256dccb)
(cherry picked from commit eb801998a29012cb0c428057ae087288e3060752)
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index a0083c73c0c0..691ea1a03e4e 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -946,7 +946,7 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL const BitmapPalette* pPal = &aPalette; //ofz#948 match the surrounding logic of case TransparentType::Bitmap of //ReadDIBBitmapEx but do it while reading for performance - const bool bIsAlpha = (nBitCount == 8 && aPalette.IsGreyPalette()); + const bool bIsAlpha = (nBitCount == 8 && !!aPalette && aPalette.IsGreyPalette()); const bool bForceToMonoWhileReading = (bIsMask && !bIsAlpha && nBitCount != 1); if (bForceToMonoWhileReading) { |