trivial fix for TextBlobCache
authorjoshualitt <joshualitt@chromium.org>
Fri, 10 Apr 2015 14:23:29 +0000 (07:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 14:23:30 +0000 (07:23 -0700)
BUG=skia:

Review URL: https://codereview.chromium.org/1076193003

src/gpu/GrTextBlobCache.h

index 9ce4ec7..1b5e5b8 100644 (file)
@@ -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();
             }