Index: gm/dashing.cpp |
diff --git a/gm/dashing.cpp b/gm/dashing.cpp |
index 0e249c7d61cae7248206b857e2d31d63e12d41df..f69a37ecd117e34167fefc9ba5ec76c937da84ef 100644 |
--- a/gm/dashing.cpp |
+++ b/gm/dashing.cpp |
@@ -21,7 +21,8 @@ static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, |
SkIntToScalar(off), |
}; |
- p.setPathEffect(SkDashPathEffect::Create(intervals, 2, phase))->unref(); |
+ SkAutoTUnref<SkPathEffect> effect(SkDashPathEffect::Create(intervals, 2, phase)); |
+ p.setPathEffect(effect); |
canvas->drawLine(startX, startY, finalX, finalY, p); |
} |