]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for crash under wxX11: we get text event there when m_popup is still NULL
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Jun 2008 11:47:24 +0000 (11:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Jun 2008 11:47:24 +0000 (11:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datectlg.cpp

index fb04195e96ccfd07d3f333358f69c361fcf4851b..476c4c5e81447e3b916f4acef75abbef6ae119f2 100644 (file)
@@ -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);