diff options
Diffstat (limited to 'gm/path_stroke_with_zero_length.cpp')
-rw-r--r-- | gm/path_stroke_with_zero_length.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gm/path_stroke_with_zero_length.cpp b/gm/path_stroke_with_zero_length.cpp index 63ffe951c6..3cb789f0ac 100644 --- a/gm/path_stroke_with_zero_length.cpp +++ b/gm/path_stroke_with_zero_length.cpp @@ -35,7 +35,9 @@ static bool draw_path_cell(SkCanvas* canvas, SkImage* img, int expectedCaps) { SkImageInfo info = SkImageInfo::MakeN32Premul(w, h); SkAutoPixmapStorage pmap; pmap.alloc(info); - SkAssertResult(img->readPixels(pmap, 0, 0)); + if (!img->readPixels(pmap, 0, 0)) { + return false; + } // To account for rasterization differences, we scan the middle two rows [y, y+1] of the image SkASSERT(h % 2 == 0); |