Index: bench/DashBench.cpp |
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp |
index eb964f6bf10c2a76ac21c078b3216b0f49919de1..e3d8364013a7c1a2da09bd3a8ce3cf43e9dc9679 100644 |
--- a/bench/DashBench.cpp |
+++ b/bench/DashBench.cpp |
@@ -72,8 +72,9 @@ protected: |
SkPath path; |
this->makePath(&path); |
- paint.setPathEffect(SkDashPathEffect::Create(fIntervals.begin(), |
- fIntervals.count(), 0))->unref(); |
+ SkAutoTUnref<SkPathEffect> effect(SkDashPathEffect::Create(fIntervals.begin(), |
+ fIntervals.count(), 0)); |
+ paint.setPathEffect(effect); |
if (fDoClip) { |
SkRect r = path.getBounds(); |