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:
@@ -134,7 +134,8 @@ void wxPickerBase::DoSetToolTip(wxToolTip *tip)
|
|||||||
m_picker->SetToolTip(tip);
|
m_picker->SetToolTip(tip);
|
||||||
|
|
||||||
// do a copy as wxWindow will own the pointer we pass
|
// 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
|
#endif // wxUSE_TOOLTIPS
|
||||||
|
Reference in New Issue
Block a user