diff options
Diffstat (limited to 'xfa/fgas/font/fgas_stdfontmgr.cpp')
-rw-r--r-- | xfa/fgas/font/fgas_stdfontmgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index a0e7e39a40..96081f5799 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -847,13 +847,13 @@ CFGAS_GEFont* CFGAS_FontMgrImp::LoadFont(const CFX_WideString& wsFaceName, if (!pFontStream) return nullptr; - CFX_Font* pInternalFont = new CFX_Font(); + std::unique_ptr<CFX_Font> pInternalFont(new CFX_Font()); if (!pInternalFont->LoadFile(pFontStream, iFaceIndex)) { pFontStream->Release(); return nullptr; } - CFGAS_GEFont* pFont = CFGAS_GEFont::LoadFont(pInternalFont, this); + CFGAS_GEFont* pFont = CFGAS_GEFont::LoadFont(std::move(pInternalFont), this); if (!pFont) { pFontStream->Release(); return nullptr; |