From 76b12b74ed911e0f84d2f8cf59adb6e740398f67 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 10 Apr 2014 21:15:30 +0000 Subject: when getClipBounds returns false, the out-param is uninitialized BUG=skia: Review URL: https://codereview.chromium.org/233933002 git-svn-id: http://skia.googlecode.com/svn/trunk@14141 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/imageblurtiled.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gm/imageblurtiled.cpp') diff --git a/gm/imageblurtiled.cpp b/gm/imageblurtiled.cpp index c3bcab998b..7200b1b418 100644 --- a/gm/imageblurtiled.cpp +++ b/gm/imageblurtiled.cpp @@ -34,7 +34,9 @@ protected: paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref(); const SkScalar tile_size = SkIntToScalar(128); SkRect bounds; - canvas->getClipBounds(&bounds); + if (!canvas->getClipBounds(&bounds)) { + bounds.setEmpty(); + } for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tile_size) { for (SkScalar x = bounds.left(); x < bounds.right(); x += tile_size) { canvas->save(); -- cgit v1.2.3