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.
This commit is contained in:
Vadim Zeitlin 2018-07-30 21:48:48 +02:00
parent e3a728d637
commit 9293634af1

View File

@ -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);
}
}