Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index dcbba9afb080976c77162628bdd7d7bfc8f5a84f..0490e8f4827aafefc5da8680936fa4599a233093 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -295,13 +295,11 @@ SkPixelRef* SkBitmap::setPixelRef(SkPixelRef* pr, int dx, int dy) { |
} |
if (fPixelRef != pr) { |
- if (fPixelRef != pr) { |
- this->freePixels(); |
- SkASSERT(NULL == fPixelRef); |
+ this->freePixels(); |
+ SkASSERT(NULL == fPixelRef); |
- SkSafeRef(pr); |
- fPixelRef = pr; |
- } |
+ SkSafeRef(pr); |
+ fPixelRef = pr; |
this->updatePixelsFromRef(); |
} |