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:
@@ -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
|
||||
|
Reference in New Issue
Block a user