Fix to the crash in all MSW/OpenWatcom apps using toolbars. wxString() in A?B:C is not a good idea.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -611,8 +611,10 @@ void wxToolBarBase::OnMouseEnter(int id)
|
||||
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
|
||||
if( frame )
|
||||
{
|
||||
wxToolBarToolBase* tool = id == wxID_ANY ? (wxToolBarToolBase*)0 : FindById(id);
|
||||
wxString help = tool ? tool->GetLongHelp() : wxString();
|
||||
wxString help;
|
||||
wxToolBarToolBase* tool = id == wxID_ANY ? (wxToolBarToolBase*)NULL : FindById(id);
|
||||
if(tool)
|
||||
help = tool->GetLongHelp();
|
||||
frame->DoGiveHelp( help, id != wxID_ANY );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user