Index: src/effects/SkBlurMaskFilter.cpp |
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp |
index 2fffd050760c3349518c92b00b8ddafddcf234c5..03eedd29afc455f21516c17157e0bcde2d31a131 100644 |
--- a/src/effects/SkBlurMaskFilter.cpp |
+++ b/src/effects/SkBlurMaskFilter.cpp |
@@ -646,13 +646,14 @@ bool GrRectBlurEffect::CreateScanlineTextures(GrContext *context, float sigma, |
GrCacheID horizontalCacheID(gBlurProfileDomain, key); |
uint8_t *profile = NULL; |
- SkAutoTDeleteArray<uint8_t> ada(profile); |
+ SkAutoTDeleteArray<uint8_t> ada(NULL); |
*horizontalScanline = context->findAndRefTexture(texDesc, horizontalCacheID, ¶ms); |
if (NULL == *horizontalScanline) { |
SkBlurMask::ComputeBlurProfile(sigma, &profile); |
+ ada.reset(profile); |
SkAutoTMalloc<uint8_t> horizontalPixels(width); |
SkBlurMask::ComputeBlurredScanline(horizontalPixels, profile, width, sigma); |
@@ -675,6 +676,7 @@ bool GrRectBlurEffect::CreateScanlineTextures(GrContext *context, float sigma, |
if (NULL == *verticalScanline) { |
if (NULL == profile) { |
SkBlurMask::ComputeBlurProfile(sigma, &profile); |
+ ada.reset(profile); |
} |
SkAutoTMalloc<uint8_t> verticalPixels(height); |