Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index c962aea21a10fc3dd4e31705a9c334dcf83e450d..e77bbbd4e5e461cd6bd1030584ab1efd824b0ea8 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -1232,6 +1232,9 @@ bool SkBitmap::ReadRawPixels(SkReadBuffer* buffer, SkBitmap* bitmap) { |
SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewWithData(info, info.minRowBytes(), |
ctable.get(), data.get())); |
+ if (!pr.get()) { |
+ return false; |
+ } |
bitmap->setInfo(pr->info()); |
bitmap->setPixelRef(pr, 0, 0); |
return true; |