Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: xfa/fwl/cfwl_barcode.cpp

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/cfwl_barcode.cpp
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index 8b05927223da6212e10c7c3d5b65dddb6a634ed6..0412b86958b1e24a70012f8e1f9f0fadacaf61fc 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -169,8 +169,7 @@ void CFWL_Barcode::GenerateBarcodeImageCache() {
if (pTheme) {
CFWL_ThemePart part;
part.m_pWidget = this;
-
- if (CFGAS_GEFont* pFont = pTheme->GetFont(&part)) {
+ if (CFX_RetainPtr<CFGAS_GEFont> pFont = pTheme->GetFont(&part)) {
if (CFX_Font* pCXFont = pFont->GetDevFont())
m_pBarcodeEngine->SetFont(pCXFont);
}

Powered by Google App Engine
This is Rietveld 408576698