diff options
author | tsepez <tsepez@chromium.org> | 2017-01-05 12:57:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-05 12:57:00 -0800 |
commit | e647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4 (patch) | |
tree | 282c502bd9f807f385d0cbcc1692bb475c8a4df1 /xfa/fde/fde_gedevice.cpp | |
parent | 6bb3b894488fd6f38c096b708980a9f08286ac5c (diff) | |
download | pdfium-e647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4.tar.xz |
Properly ref-count CFGAS_GEFont with CFX_RetainPtr.
We worry about cyclical references, but no leaks found.
Review-Url: https://codereview.chromium.org/2609423003
Diffstat (limited to 'xfa/fde/fde_gedevice.cpp')
-rw-r--r-- | xfa/fde/fde_gedevice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index bf34135f3e..081f00a036 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -105,7 +105,7 @@ bool CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib, return !!handle; } bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, - CFGAS_GEFont* pFont, + const CFX_RetainPtr<CFGAS_GEFont>& pFont, const FXTEXT_CHARPOS* pCharPos, int32_t iCount, FX_FLOAT fFontSize, @@ -126,8 +126,8 @@ bool CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, } } FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; - CFGAS_GEFont* pCurFont = nullptr; - CFGAS_GEFont* pSTFont = nullptr; + CFX_RetainPtr<CFGAS_GEFont> pCurFont; + CFX_RetainPtr<CFGAS_GEFont> pSTFont; FXTEXT_CHARPOS* pCurCP = nullptr; int32_t iCurCount = 0; |