decrement lockcount if we failed to get pixels
authorreed <reed@google.com>
Tue, 11 Aug 2015 19:23:45 +0000 (12:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Aug 2015 19:23:45 +0000 (12:23 -0700)
BUG=519581

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

src/core/SkPixelRef.cpp

index 2a46385c2416f545b88d3e2da7a0c25315bcf920..bb21372f15a108accdd55aaadf199ceec3697e98 100644 (file)
@@ -200,6 +200,8 @@ bool SkPixelRef::lockPixelsInsideMutex() {
         validate_pixels_ctable(fInfo, fRec.fColorTable);
         return true;
     }
+    // no pixels, so we failed (somehow)
+    --fLockCount;
     return false;
 }