aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrTestUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index 714b99f65c..de840cca91 100644
--- a/src/gpu/GrTestUtils.cpp
+++ b/src/gpu/GrTestUtils.cpp
@@ -244,7 +244,8 @@ GrStrokeInfo TestStrokeInfo(SkRandom* random) {
randomize_stroke_rec(&strokeInfo, random);
SkPathEffect::DashInfo dashInfo;
dashInfo.fCount = random->nextRangeU(1, 50) * 2;
- dashInfo.fIntervals = SkNEW_ARRAY(SkScalar, dashInfo.fCount);
+ SkAutoTDeleteArray<SkScalar> intervals(SkNEW_ARRAY(SkScalar, dashInfo.fCount));
+ dashInfo.fIntervals = intervals.get();
SkScalar sum = 0;
for (int i = 0; i < dashInfo.fCount; i++) {
dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01),