Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 638f6708343ec6c8b24dcb5d35cde124cbfc5452..fe31d61ef0182a590d959667f695f1bae309ea89 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -88,7 +88,11 @@ Error CodecSrc::draw(SkCanvas* canvas) const { |
SkISize CodecSrc::size() const { |
SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(fPath.c_str())); |
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
- return codec->getInfo().dimensions(); |
+ if (NULL != codec) { |
+ return codec->getInfo().dimensions(); |
+ } else { |
+ return SkISize::Make(0, 0); |
+ } |
} |
Name CodecSrc::name() const { |