Index: src/gpu/GrTextBlobCache.h |
diff --git a/src/gpu/GrTextBlobCache.h b/src/gpu/GrTextBlobCache.h |
index 9ce4ec7af2553c0b291eee588aad44be91f9ffe9..1b5e5b8803865c8f92e6c1d11bca6a670f62572c 100644 |
--- a/src/gpu/GrTextBlobCache.h |
+++ b/src/gpu/GrTextBlobCache.h |
@@ -65,8 +65,10 @@ public: |
SkASSERT(lruBlob); |
while (fPool.size() > kBudget && (lruBlob = iter.get()) && lruBlob != blob) { |
fCache.remove(lruBlob->fUniqueID); |
- fBlobList.remove(lruBlob); |
+ |
+ // Backup the iterator before removing and unrefing the blob |
iter.prev(); |
+ fBlobList.remove(lruBlob); |
lruBlob->unref(); |
} |