don't crash when setting tooltip for a picker without text control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-01-14 16:18:36 +00:00
parent 5d389b0445
commit 4f690a1d5e

View File

@ -134,7 +134,8 @@ void wxPickerBase::DoSetToolTip(wxToolTip *tip)
m_picker->SetToolTip(tip);
// do a copy as wxWindow will own the pointer we pass
m_text->SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL);
if ( m_text )
m_text->SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL);
}
#endif // wxUSE_TOOLTIPS