From 4f690a1d5e6192d0861686982e89f9f17a21e679 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Jan 2007 16:18:36 +0000 Subject: [PATCH] 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 --- src/common/pickerbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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