Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2920)

Unified Diff: core/fxge/skia/fx_skia_device.cpp

Issue 2255763002: check for null bitmap (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/skia/fx_skia_device.cpp
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 3effa0a6a6fbe2f6ece9e25044ecb8f52954208e..32e90e1bcb8126474f4c13d212415245263c1f63 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698