diff --git a/tests/sizers/boxsizer.cpp b/tests/sizers/boxsizer.cpp index 3132c5f061..813ff27f5b 100644 --- a/tests/sizers/boxsizer.cpp +++ b/tests/sizers/boxsizer.cpp @@ -416,8 +416,8 @@ void BoxSizerTestCase::IncompatibleFlags() // And now exactly the same thing in the other direction. - delete m_sizer; m_sizer = new wxBoxSizer(wxVERTICAL); + m_win->SetSizer(m_sizer); ASSERT_SIZER_INVALID_FLAGS( wxALIGN_BOTTOM,