Fix refcounting bug for Type1 font usage with more than 255 characters.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 5 Dec 2013 21:14:02 +0000 (21:14 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 5 Dec 2013 21:14:02 +0000 (21:14 +0000)
R=bungeman@google.com

Author: vandebo@chromium.org

Review URL: https://codereview.chromium.org/103423003

git-svn-id: http://skia.googlecode.com/svn/trunk@12520 2bbb7eff-a529-9590-31e7-b0007b416f81

src/pdf/SkPDFFont.cpp

index b824506b189715b5ab0f04255716597c95482ae0..1641a8916c32c9757741658b379cfa105499ae73 100644 (file)
@@ -875,9 +875,8 @@ SkPDFFont::SkPDFFont(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface,
           fTypeface(ref_or_default(typeface)),
           fFirstGlyphID(1),
           fLastGlyphID(info ? info->fLastGlyphID : 0),
-          fFontInfo(info),
-          fDescriptor(relatedFontDescriptor) {
-    SkSafeRef(info);
+          fFontInfo(SkSafeRef(info)),
+          fDescriptor(SkSafeRef(relatedFontDescriptor)) {
     if (info == NULL) {
         fFontType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font;
     } else if (info->fMultiMaster) {