Index: src/core/SkPixelRef.cpp |
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp |
index 740d269a27a339065b4a91c9f8fa8fbb4d80ca94..b5daf0b57a90ca0321babf11c37da2eef05fab93 100644 |
--- a/src/core/SkPixelRef.cpp |
+++ b/src/core/SkPixelRef.cpp |
@@ -178,10 +178,6 @@ |
if (1 == ++fLockCount) { |
fPixels = this->onLockPixels(&fColorTable); |
- // If onLockPixels failed, it will return NULL |
- if (NULL == fPixels) { |
- fColorTable = NULL; |
- } |
} |
} |
} |
@@ -194,14 +190,9 @@ |
SkASSERT(fLockCount > 0); |
if (0 == --fLockCount) { |
- // don't call onUnlockPixels unless onLockPixels succeeded |
- if (fPixels) { |
- this->onUnlockPixels(); |
- fPixels = NULL; |
- fColorTable = NULL; |
- } else { |
- SkASSERT(NULL == fColorTable); |
- } |
+ this->onUnlockPixels(); |
+ fPixels = NULL; |
+ fColorTable = NULL; |
} |
} |
} |