git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54342
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxToolBarBase *toolBar = GetToolBar();
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
wxToolBarBase *toolBar = GetToolBar();
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
+ if (toolBar && m_searchTool && m_searchTool->GetToolBar() == NULL)
+ {
+ // see ~MyFrame()
+ toolBar->AddTool(m_searchTool);
+ }
+ m_searchTool = NULL;
+
delete toolBar;
SetToolBar(NULL);
delete toolBar;
SetToolBar(NULL);