From: Vadim Zeitlin Date: Wed, 11 Jun 2008 11:47:24 +0000 (+0000) Subject: fix for crash under wxX11: we get text event there when m_popup is still NULL X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b0fb790beb01e56259c70b1ff22d9034d966b4cb fix for crash under wxX11: we get text event there when m_popup is still NULL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index fb04195e96..476c4c5e81 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -458,7 +458,7 @@ void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev) // We'll create an additional event if the date is valid. // If the date isn't valid, the user's probably in the middle of typing wxDateTime dt; - if ( !m_popup->ParseDateTime(m_combo->GetValue(), &dt) ) + if ( !m_popup || !m_popup->ParseDateTime(m_combo->GetValue(), &dt) ) return; m_popup->SendDateEvent(dt);