fix crash on exit, after hiding search tool then toggling tooltips
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -332,6 +332,13 @@ void MyFrame::RecreateToolbar()
|
|||||||
wxToolBarBase *toolBar = GetToolBar();
|
wxToolBarBase *toolBar = GetToolBar();
|
||||||
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
|
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;
|
delete toolBar;
|
||||||
|
|
||||||
SetToolBar(NULL);
|
SetToolBar(NULL);
|
||||||
|
Reference in New Issue
Block a user