Index: src/lazy/SkDiscardableMemoryPool.cpp |
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp |
index 1f4836604d2233914af709a7ce06d5f1db82d88c..5b9d87ff2fd1d4a9222d156b365a187efd5ec968 100644 |
--- a/src/lazy/SkDiscardableMemoryPool.cpp |
+++ b/src/lazy/SkDiscardableMemoryPool.cpp |
@@ -188,9 +188,9 @@ SkDiscardableMemory* DiscardableMemoryPool::create(size_t bytes) { |
} |
void DiscardableMemoryPool::free(PoolDiscardableMemory* dm) { |
+ SkAutoMutexAcquire autoMutexAcquire(fMutex); |
// This is called by dm's destructor. |
if (dm->fPointer != NULL) { |
- SkAutoMutexAcquire autoMutexAcquire(fMutex); |
sk_free(dm->fPointer); |
dm->fPointer = NULL; |
SkASSERT(fUsed >= dm->fBytes); |