From 9293634af148aea2cb6dfb11bd981b95f204d07e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 Jul 2018 21:48:48 +0200 Subject: [PATCH] Avoid assertion failure when typing into generic wxDatePickerCtrl Don't call wxCalendarCtrl::SetDate() if the current date is invalid, this would just result in an assertion failure. --- src/generic/datectlg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index d5abccfd3a..f2a13d143a 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -192,7 +192,8 @@ private: if ( (dt.IsValid() && (!dtOld.IsValid() || dt != dtOld)) || (!dt.IsValid() && dtOld.IsValid()) ) { - SetDate(dt); + if ( dt.IsValid() ) + SetDate(dt); SendDateEvent(dt); } }