Index: src/effects/SkOffsetImageFilter.cpp |
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp |
index aefbcba8ad5c82bf5316598c4ac16fa5d2f7b461..59318e3915c1ea86c5acb28e9846d6b0c1669fb2 100644 |
--- a/src/effects/SkOffsetImageFilter.cpp |
+++ b/src/effects/SkOffsetImageFilter.cpp |
@@ -48,6 +48,9 @@ bool SkOffsetImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source, |
} |
SkAutoTUnref<SkBaseDevice> device(proxy->createDevice(bounds.width(), bounds.height())); |
+ if (NULL == device.get()) { |
+ return false; |
+ } |
SkCanvas canvas(device); |
SkPaint paint; |
paint.setXfermodeMode(SkXfermode::kSrc_Mode); |