Index: src/effects/SkRectShaderImageFilter.cpp |
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp |
index fe0be12e615c852393a981340d519ec7e42142e4..be3c23ce4b411bedf08559f3383be9020d9125fe 100644 |
--- a/src/effects/SkRectShaderImageFilter.cpp |
+++ b/src/effects/SkRectShaderImageFilter.cpp |
@@ -44,7 +44,8 @@ SkRectShaderImageFilter::SkRectShaderImageFilter(SkReadBuffer& buffer) |
SkFlattenable* SkRectShaderImageFilter::CreateProc(SkReadBuffer& buffer) { |
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0); |
- return Create(buffer.readShader(), &common.cropRect()); |
+ SkAutoTUnref<SkShader> shader(buffer.readShader()); |
+ return Create(shader.get(), &common.cropRect()); |
} |
void SkRectShaderImageFilter::flatten(SkWriteBuffer& buffer) const { |