diff --git a/dom/plugins/base/android/ANPTypeface.cpp b/dom/plugins/base/android/ANPTypeface.cpp index 78e6b1a57875..067f810e308b 100644 --- a/dom/plugins/base/android/ANPTypeface.cpp +++ b/dom/plugins/base/android/ANPTypeface.cpp @@ -62,7 +62,7 @@ anp_typeface_createFromName(const char name[], ANPTypefaceStyle aStyle) ANPTypeface* tf = new ANPTypeface; gfxAndroidPlatform * p = (gfxAndroidPlatform*)gfxPlatform::GetPlatform(); nsRefPtr font = gfxFT2Font::GetOrMakeFont(NS_ConvertASCIItoUTF16(name), &style); - tf->mFont = font.forget(); + font.forget(&tf->mFont); if (tf->mFont) { ++tf->mRefCnt; }