diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-20 19:05:09 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-21 02:06:15 +0000 |
commit | 253b4dd51fab530054bcf28a59341b4bd1622430 (patch) | |
tree | 7b922f21df7f9b4f12dac694627812711b256af0 /gm | |
parent | 144a5c518ae921f210bdd9647c061e57d18f440c (diff) |
Handle failed surface creation in AlphaThresholdImageFilter GM
Change-Id: Ibc27d26a9afc1f88d5ca7de2216e09afa10ce846
Reviewed-on: https://skia-review.googlesource.com/6354
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'gm')
-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()); |