diff --git a/tests/controls/notebooktest.cpp b/tests/controls/notebooktest.cpp index 60c9cdd31b..d8f80e40a2 100644 --- a/tests/controls/notebooktest.cpp +++ b/tests/controls/notebooktest.cpp @@ -20,6 +20,7 @@ #endif // WX_PRECOMP #include "wx/notebook.h" +#include "wx/scopedptr.h" #include "bookctrlbasetest.h" #include "testableframe.h" @@ -125,6 +126,7 @@ TEST_CASE("wxNotebook::AddPageEvents", "[wxNotebook][AddPage][event]") wxNotebook* const notebook = new wxNotebook(wxTheApp->GetTopWindow(), wxID_ANY, wxDefaultPosition, wxSize(400, 200)); + wxScopedPtr cleanup(notebook); CHECK( notebook->GetSelection() == wxNOT_FOUND );