| Index: xfa/fxfa/app/xfa_fwltheme.cpp
|
| diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
|
| index df09fb504a9a94629e16fc6ac051d8b1026e617b..14649f1b80add370328113ca371962e94c864a28 100644
|
| --- a/xfa/fxfa/app/xfa_fwltheme.cpp
|
| +++ b/xfa/fxfa/app/xfa_fwltheme.cpp
|
| @@ -35,14 +35,13 @@ const FX_WCHAR* const g_FWLTheme_CalFonts[] = {
|
|
|
| CXFA_FFWidget* XFA_ThemeGetOuterWidget(IFWL_Widget* pWidget) {
|
| IFWL_Widget* pOuter = pWidget;
|
| - while (pOuter->GetOuter()) {
|
| + while (pOuter && pOuter->GetOuter())
|
| pOuter = pOuter->GetOuter();
|
| - }
|
| - if (pOuter) {
|
| - return (CXFA_FFWidget*)pOuter->GetPrivateData(pOuter);
|
| - }
|
| - return NULL;
|
| +
|
| + return pOuter ? static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem())
|
| + : nullptr;
|
| }
|
| +
|
| CXFA_FWLTheme::CXFA_FWLTheme(CXFA_FFApp* pApp) : m_pApp(pApp) {
|
| m_dwCapacity = 0;
|
| m_fCapacity = 0;
|
|
|