From 8ca0f059bb13a12d50a8a4f3a6e4b3c91cfa570e Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 17 Aug 2016 07:34:52 -0700 Subject: 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 --- core/fxge/skia/fx_skia_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3