summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorcaryclark <caryclark@google.com>2016-08-17 07:34:52 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-17 07:34:52 -0700
commit8ca0f059bb13a12d50a8a4f3a6e4b3c91cfa570e (patch)
tree0f5805da515e57b0d78e39a43ccd353ade082e3b /core/fxge
parent4674d957a7637da9d242ff1bdba73a078f99a171 (diff)
downloadpdfium-8ca0f059bb13a12d50a8a4f3a6e4b3c91cfa570e.tar.xz
check for null bitmap
Recent Skia driver addition of 8 bit src / 8 bit dst workaround needs to check for a nullptr bitmap. R==dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2255763002
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 3effa0a6a6..32e90e1bcb 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -1463,7 +1463,7 @@ FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource,
SetBitmapPaint(pSource->IsAlphaMask(), argb, bitmap_alpha, blend_type,
&paint);
// TODO(caryclark) Once Skia supports 8 bit src to 8 bit dst remove this
- if (m_pBitmap->GetBPP() == 8 && pSource->GetBPP() == 8) {
+ if (m_pBitmap && m_pBitmap->GetBPP() == 8 && pSource->GetBPP() == 8) {
SkMatrix inv;
SkAssertResult(skMatrix.invert(&inv));
for (int y = 0; y < m_pBitmap->GetHeight(); ++y) {