Index: src/core/SkBitmapProcState.cpp |
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
index db446a2445a50668ad4524894efbdd33c435d7a4..c50266f017328c4adfddc28502281a32b098c644 100644 |
--- a/src/core/SkBitmapProcState.cpp |
+++ b/src/core/SkBitmapProcState.cpp |
@@ -299,6 +299,11 @@ bool SkBitmapProcState::lockBaseBitmap() { |
} |
} |
fScaledBitmap.lockPixels(); // just 'cause the cache made a copy :( |
+ if (!fScaledBitmap.getPixels()) { |
+ // TODO: find out how this can happen, and add a unittest to exercise |
+ // inspired by BUG=chromium:295895 |
+ return false; |
+ } |
fBitmap = &fScaledBitmap; |
return true; |
} |