Index: src/lazy/SkDiscardablePixelRef.cpp |
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp |
index 2528a994d185bb3e319785db5cb180bcdc03abc1..6a9507c8c76a713bba3c7a85388e3f8e4c78d702 100644 |
--- a/src/lazy/SkDiscardablePixelRef.cpp |
+++ b/src/lazy/SkDiscardablePixelRef.cpp |
@@ -58,7 +58,9 @@ |
return pixels; |
} |
void SkDiscardablePixelRef::onUnlockPixels() { |
- fDiscardableMemory->unlock(); |
+ if (fDiscardableMemory != NULL) { |
+ fDiscardableMemory->unlock(); |
+ } |
} |
bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, |