diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkRefCnt.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 2d183cd844..3a0f8be383 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -155,10 +155,8 @@ public: T* get() const { return fObj; } void reset(T* obj) { - if (obj != fObj) { - SkSafeUnref(fObj); - fObj = obj; - } + SkSafeUnref(fObj); + fObj = obj; } void swap(SkAutoTUnref* other) { |