aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 14:25:42 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 14:25:42 +0000
commit0729b623730983821ef53fad9c988bad030509ed (patch)
tree5833db2c5c8e89b9a2451246ba7304abfa32b13e /src
parentf92cfcf3628ad455ad2e11011db5573563447688 (diff)
Fix a Ref count bug in SkFontHost_win_dw.cpp
https://codereview.appspot.com/6495133 Props tinytail. git-svn-id: http://skia.googlecode.com/svn/trunk@5568 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/ports/SkFontHost_win_dw.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp
index 5b5da64f29..d8a1cdc1f3 100644
--- a/src/ports/SkFontHost_win_dw.cpp
+++ b/src/ports/SkFontHost_win_dw.cpp
@@ -688,9 +688,7 @@ SkTypeface* SkCreateTypefaceFromDWriteFont(IDWriteFontFace* fontFace,
StreamFontFileLoader* fontFileLoader = NULL,
IDWriteFontCollectionLoader* fontCollectionLoader = NULL) {
SkTypeface* face = SkTypefaceCache::FindByProcAndRef(FindByDWriteFont, font);
- if (face) {
- face->ref();
- } else {
+ if (NULL == face) {
face = DWriteFontTypeface::Create(fontFace, font, fontFamily,
fontFileLoader, fontCollectionLoader);
SkTypefaceCache::Add(face, get_style(font), fontCollectionLoader != NULL);