Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: src/gpu/GrTextBlobCache.h

Issue 1076193003: trivial fix for TextBlobCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698