diff options
Diffstat (limited to 'xfa/fwl/cfwl_listbox.cpp')
-rw-r--r-- | xfa/fwl/cfwl_listbox.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp index 445d81ceb7..e50aa05782 100644 --- a/xfa/fwl/cfwl_listbox.cpp +++ b/xfa/fwl/cfwl_listbox.cpp @@ -94,10 +94,11 @@ void CFWL_ListBox::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) { if (!pGraphics) return; - if (!m_pProperties->m_pThemeProvider) + + IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider.Get(); + if (!pTheme) return; - IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; pGraphics->SaveGraphState(); if (HasBorder()) DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix); @@ -599,8 +600,8 @@ float CFWL_ListBox::GetMaxTextWidth() { if (!pItem) continue; - CFX_SizeF sz = - CalcTextSize(pItem->GetText(), m_pProperties->m_pThemeProvider, false); + CFX_SizeF sz = CalcTextSize(pItem->GetText(), + m_pProperties->m_pThemeProvider.Get(), false); fRet = std::max(fRet, sz.width); } return fRet; |