Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index b420df2bc806c0b06fcb7aeff9f18ff5e61e0c1c..63beb7de22645a9c191e36b287f1fb2f60c60e7a 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -548,8 +548,9 @@ void GrContext::unlockScratchTexture(GrTexture* texture) { |
if (texture->wasDestroyed()) { |
if (texture->getCacheEntry()->key().isScratch()) { |
// This texture was detached from the cache but the cache still had a ref to it but |
- // not a pointer to it. |
- texture->unref(); |
+ // not a pointer to it. This will unref the texture and delete its resource cache |
+ // entry. |
+ delete texture->getCacheEntry(); |
} |
return; |
} |