From c7c3f124fb4ece9a1e09ef16058c2f51947bf714 Mon Sep 17 00:00:00 2001 From: Jun Fang Date: Thu, 10 Dec 2015 18:29:34 -0800 Subject: Fix crashing in CFWL_CheckBox::Initialize() BUG=pdfium:324 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1507683010 . --- xfa/src/fwl/src/lightwidget/checkbox.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'xfa/src') diff --git a/xfa/src/fwl/src/lightwidget/checkbox.cpp b/xfa/src/fwl/src/lightwidget/checkbox.cpp index 37aeb087f1..b1b938435b 100644 --- a/xfa/src/fwl/src/lightwidget/checkbox.cpp +++ b/xfa/src/fwl/src/lightwidget/checkbox.cpp @@ -14,12 +14,8 @@ FWL_ERR CFWL_CheckBox::Initialize(const CFWL_WidgetProperties* pProperties) { if (pProperties) { *m_pProperties = *pProperties; } - CFWL_WidgetImpProperties prop = - m_pProperties->MakeWidgetImpProperties(&m_checkboxData); - prop.m_pParent = m_pProperties->m_pParent->GetWidget(); - prop.m_pOwner = m_pProperties->m_pOwner->GetWidget(); - nonstd::unique_ptr pCheckBox( - IFWL_CheckBox::Create(prop, nullptr)); + nonstd::unique_ptr pCheckBox(IFWL_CheckBox::Create( + m_pProperties->MakeWidgetImpProperties(&m_checkboxData), nullptr)); FWL_ERR ret = pCheckBox->Initialize(); if (ret != FWL_ERR_Succeeded) { return ret; -- cgit v1.2.3