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:
Włodzimierz Skiba
2004-10-14 17:27:33 +00:00
parent e7274ba212
commit 326a37f148

View File

@@ -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 );
}