Fix adding a control to two different sizers in the widgets sample.

A checkbox on the static page was added to two sizers at once, resulting in
heap corruption later. Fix this by adding it to the right sizer only.

Closes #13619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-11-05 11:23:57 +00:00
parent c977643bb1
commit 3a6b6a9889

View File

@@ -326,10 +326,8 @@ void StaticWidgetsPage::CreateContent()
sizerMiddle->Add(m_textLabelWithMarkup, 0, wxEXPAND|wxALL, 5);
sizerMiddle->Add(b3, 0, wxLEFT|wxBOTTOM, 5);
m_chkGreen = CreateCheckBoxAndAddToSizer(sizerLeft,
m_chkGreen = CreateCheckBoxAndAddToSizer(sizerMiddle,
"Decorated label on g&reen");
sizerMiddle->Add(m_chkGreen, 0, wxALL, 5);
#endif // wxUSE_MARKUP
// final initializations