Index: src/ports/SkFontHost_mac.cpp |
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
index 21a2b956148b8ac53a17d2a3b94498ffdbf51e18..7f3a3c1ef4d86871d8fac7ddf4f8ddf2c640bac7 100755 |
--- a/src/ports/SkFontHost_mac.cpp |
+++ b/src/ports/SkFontHost_mac.cpp |
@@ -82,9 +82,10 @@ public: |
~AutoCFRelease() { CFSafeRelease(fCFRef); } |
void reset(CFRef that = NULL) { |
- CFSafeRetain(that); |
- CFSafeRelease(fCFRef); |
- fCFRef = that; |
+ if (that != fCFRef) { |
+ CFSafeRelease(fCFRef); |
+ fCFRef = that; |
+ } |
} |
AutoCFRelease& operator =(CFRef that) { |
bungeman-skia
2014/07/14 17:38:30
I think I actually wrote this, but now I hate this
|