Index: src/gpu/GrLayerCache.cpp |
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp |
index f33384c3e994db64a27604b5149c1b73c2d4db08..27cb55b9ee7358bdffcdba9ae2e49b6f73902cab 100644 |
--- a/src/gpu/GrLayerCache.cpp |
+++ b/src/gpu/GrLayerCache.cpp |
@@ -467,7 +467,7 @@ void GrLayerCache::purgeAll() { |
SkASSERT(0 == fPictureHash.count()); |
- GrDrawContext* drawContext = fContext->drawContext(); |
+ SkAutoTUnref<GrDrawContext> drawContext(fContext->drawContext()); |
if (drawContext) { |
drawContext->discard(fAtlas->getTexture()->asRenderTarget()); |