Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp |
diff --git a/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
index b7250d6b6fa28e210e78d5d9b6a6feeac0ab32ca..524f7e861b8287736661bf638997a57ea7f9da4b 100644 |
--- a/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
+++ b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
@@ -52,7 +52,7 @@ void FontCache::addSideloadedFontForTesting(SkTypeface* typeface) |
s_sideloadedFonts = new HashMap<String, RefPtr<SkTypeface> >; |
SkString name; |
typeface->getFamilyName(&name); |
- s_sideloadedFonts->set(name.c_str(), typeface); |
+ s_sideloadedFonts->set(name.c_str(), adoptRef(typeface)); |
} |
FontCache::FontCache() |