Index: src/lazy/SkDiscardablePixelRef.cpp |
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp |
index 6a9507c8c76a713bba3c7a85388e3f8e4c78d702..0b193ade3c35d234fa08b35aacf06e41bcfb4e89 100644 |
--- a/src/lazy/SkDiscardablePixelRef.cpp |
+++ b/src/lazy/SkDiscardablePixelRef.cpp |
@@ -30,6 +30,9 @@ SkDiscardablePixelRef::SkDiscardablePixelRef(SkImageGenerator* generator, |
} |
SkDiscardablePixelRef::~SkDiscardablePixelRef() { |
+ if (this->isLocked()) { |
+ fDiscardableMemory->unlock(); |
+ } |
SkDELETE(fDiscardableMemory); |
SkSafeUnref(fDMFactory); |
SkDELETE(fGenerator); |