| Index: xfa/src/fwl/src/lightwidget/edit.cpp
|
| diff --git a/xfa/src/fwl/src/lightwidget/edit.cpp b/xfa/src/fwl/src/lightwidget/edit.cpp
|
| index 8e89e6474bcb7ee1f6d5a0d5ccc14cbd57230025..92e8f8138c6477b088b3e827b761ef42264130f2 100644
|
| --- a/xfa/src/fwl/src/lightwidget/edit.cpp
|
| +++ b/xfa/src/fwl/src/lightwidget/edit.cpp
|
| @@ -14,15 +14,15 @@ FWL_ERR CFWL_Edit::Initialize(const CFWL_WidgetProperties* pProperties) {
|
| if (pProperties) {
|
| *m_pProperties = *pProperties;
|
| }
|
| - m_pIface = new IFWL_Edit;
|
| - FWL_ERR ret =
|
| - ((IFWL_Edit*)m_pIface)
|
| - ->Initialize(m_pProperties->MakeWidgetImpProperties(nullptr),
|
| - nullptr);
|
| - if (ret == FWL_ERR_Succeeded) {
|
| - CFWL_Widget::Initialize();
|
| + nonstd::unique_ptr<IFWL_Edit> pEdit(IFWL_Edit::Create(
|
| + m_pProperties->MakeWidgetImpProperties(nullptr), nullptr));
|
| + FWL_ERR ret = pEdit->Initialize();
|
| + if (ret != FWL_ERR_Succeeded) {
|
| + return ret;
|
| }
|
| - return ret;
|
| + m_pIface = pEdit.release();
|
| + CFWL_Widget::Initialize();
|
| + return FWL_ERR_Succeeded;
|
| }
|
| FWL_ERR CFWL_Edit::SetText(const CFX_WideString& wsText) {
|
| if (!m_pIface)
|
|
|