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

Unified Diff: src/effects/SkTileImageFilter.cpp

Issue 92793002: Fixed bad bitmap size crashes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Changed getSize name to getAllocatedSizeInBytes Created 7 years 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
Index: src/effects/SkTileImageFilter.cpp
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index ccca4ff74caf3a75ccd7e43cb6d22246d91f9674..7d3b72f0c6200bbd15f428b5bb22f866dc4baccb 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -38,6 +38,9 @@ bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const S
}
SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(w, h));
+ if (NULL == device.get()) {
+ return false;
+ }
SkIRect bounds;
source.getBounds(&bounds);
SkCanvas canvas(device);

Powered by Google App Engine
This is Rietveld 408576698