summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_radiobutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_radiobutton.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index c8103d4a62..f987d7613c 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -24,7 +24,9 @@ std::unique_ptr<CPWL_Wnd> CFFL_RadioButton::NewPWLWindow(
const CPWL_Wnd::CreateParams& cp,
std::unique_ptr<CPWL_Wnd::PrivateData> pAttachedData) {
auto pWnd = pdfium::MakeUnique<CPWL_RadioButton>(std::move(pAttachedData));
- pWnd->Create(cp);
+ if (cp.pParentWnd)
+ cp.pParentWnd->AddChild(pWnd.get());
+ pWnd->Realize(cp);
pWnd->SetCheck(m_pWidget->IsChecked());
return std::move(pWnd);
}