| Index: xfa/src/fwl/src/lightwidget/pushbutton.cpp
|
| diff --git a/xfa/src/fwl/src/lightwidget/pushbutton.cpp b/xfa/src/fwl/src/lightwidget/pushbutton.cpp
|
| index 24050c86662a8ab7913c830d4c9655a51b9f400f..a3df89106db402a8764769ffcf584f99c0abb3e2 100644
|
| --- a/xfa/src/fwl/src/lightwidget/pushbutton.cpp
|
| +++ b/xfa/src/fwl/src/lightwidget/pushbutton.cpp
|
| @@ -14,15 +14,15 @@ FWL_ERR CFWL_PushButton::Initialize(const CFWL_WidgetProperties* pProperties) {
|
| if (pProperties) {
|
| *m_pProperties = *pProperties;
|
| }
|
| - m_pIface = new IFWL_PushButton;
|
| - FWL_ERR ret =
|
| - ((IFWL_PushButton*)m_pIface)
|
| - ->Initialize(m_pProperties->MakeWidgetImpProperties(&m_buttonData),
|
| - nullptr);
|
| - if (ret == FWL_ERR_Succeeded) {
|
| - CFWL_Widget::Initialize();
|
| + nonstd::unique_ptr<IFWL_PushButton> pPushButton(IFWL_PushButton::Create(
|
| + m_pProperties->MakeWidgetImpProperties(&m_buttonData), nullptr));
|
| + FWL_ERR ret = pPushButton->Initialize();
|
| + if (ret != FWL_ERR_Succeeded) {
|
| + return ret;
|
| }
|
| - return ret;
|
| + m_pIface = pPushButton.release();
|
| + CFWL_Widget::Initialize();
|
| + return FWL_ERR_Succeeded;
|
| }
|
| FWL_ERR CFWL_PushButton::GetCaption(CFX_WideString& wsCaption) {
|
| wsCaption = m_buttonData.m_wsCaption;
|
|
|