diff options
Diffstat (limited to 'gm/imagealphathreshold.cpp')
-rw-r--r-- | gm/imagealphathreshold.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gm/imagealphathreshold.cpp b/gm/imagealphathreshold.cpp index 302cdeea52..193423d326 100644 --- a/gm/imagealphathreshold.cpp +++ b/gm/imagealphathreshold.cpp @@ -131,6 +131,9 @@ protected: sk_sp<SkSurface> surface(make_color_matching_surface(canvas, WIDTH, HEIGHT, kPremul_SkAlphaType)); + if (!surface) { + return; + } surface->getCanvas()->clear(SK_ColorTRANSPARENT); draw_rects(surface->getCanvas()); |