aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-07-08 08:26:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-08 08:26:39 -0700
commiteedc3342db6e867f0a7e458e77072e81ffb74fc3 (patch)
tree142f9d23a8a8fc35bddf1cbf611258cd26ae7b93 /tests
parent2cff176fa25e962f7ae53ebeefa833f0eed276cc (diff)
Fix leak in PictureTest.cpp
TBR=schenney@chromium.org BUG=skia: Review URL: https://codereview.chromium.org/1210053008
Diffstat (limited to 'tests')
-rw-r--r--tests/PictureTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index b235a0cc23..ae1ef65002 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -993,7 +993,8 @@ static void test_cull_rect_reset(skiatest::Reporter* reporter) {
SkPaint paint;
canvas->drawRect(bounds, paint);
canvas->drawRect(bounds, paint);
- const SkBigPicture* picture = recorder.endRecordingAsPicture(bounds)->asSkBigPicture();
+ SkAutoTUnref<const SkPicture> p(recorder.endRecordingAsPicture(bounds));
+ const SkBigPicture* picture = p->asSkBigPicture();
REPORTER_ASSERT(reporter, picture);
SkRect finalCullRect = picture->cullRect();