Chromium Code Reviews| Index: include/core/SkRefCnt.h |
| diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
| index 9b05ad49698cb2b6ea15f84e670b24492d0eff9e..d33117751e0717943ec28b890bd645e98ff8f6bc 100644 |
| --- a/include/core/SkRefCnt.h |
| +++ b/include/core/SkRefCnt.h |
| @@ -338,10 +338,8 @@ public: |
| * No call to ref() will be made. |
| */ |
| void reset(T* ptr = nullptr) { |
| - if (fPtr != ptr) { |
| - SkSafeUnref(fPtr); |
| - fPtr = ptr; |
| - } |
| + SkSafeUnref(fPtr); |
| + fPtr = ptr; |
| } |
| /** |