Index: xfa/fgas/font/fgas_gefont.cpp |
diff --git a/xfa/fgas/font/fgas_gefont.cpp b/xfa/fgas/font/fgas_gefont.cpp |
index 576f482df262f22884fc5ea83c2a3fa6cd55f11a..48635cabf7b324c5f018b8f9cd57521349305e28 100644 |
--- a/xfa/fgas/font/fgas_gefont.cpp |
+++ b/xfa/fgas/font/fgas_gefont.cpp |
@@ -109,7 +109,7 @@ CFGAS_GEFont::CFGAS_GEFont(const CFGAS_GEFont& src, uint32_t dwFontStyles) |
CFX_SubstFont* pSubst = m_pFont->GetSubstFont(); |
if (!pSubst) { |
pSubst = new CFX_SubstFont; |
- m_pFont->SetSubstFont(pSubst); |
+ m_pFont->SetSubstFont(std::unique_ptr<CFX_SubstFont>(pSubst)); |
} |
pSubst->m_Weight = |
(dwFontStyles & FX_FONTSTYLE_Bold) ? FXFONT_FW_BOLD : FXFONT_FW_NORMAL; |