Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 929ff0556b453de2a5786595fb107e69fdc4febe..3db7582aa151fd4965a55e7e2354c84c14f836f9 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -361,6 +361,9 @@ static Error draw_skdocument(const Src& src, SkDocument* doc, SkWStream* dst) { |
int h = SkTMin(kLetterHeight, height - (y * kLetterHeight)); |
SkCanvas* canvas = |
doc->beginPage(SkIntToScalar(w), SkIntToScalar(h)); |
+ if (!canvas) { |
+ return "SkDocument::beginPage(w,h) returned NULL"; |
djsollen
2015/04/03 13:35:01
I think it may be better if we could just produce
|
+ } |
canvas->clipRect(letter); |
canvas->translate(-letter.width() * x, -letter.height() * y); |
Error err = src.draw(canvas); |