From: Vadim Zeitlin Date: Sun, 14 Jan 2007 16:18:36 +0000 (+0000) Subject: don't crash when setting tooltip for a picker without text control X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4f690a1d5e6192d0861686982e89f9f17a21e679?ds=inline 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 --- diff --git a/src/common/pickerbase.cpp b/src/common/pickerbase.cpp index 3d09e22d11..867712afbf 100644 --- a/src/common/pickerbase.cpp +++ b/src/common/pickerbase.cpp @@ -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