fix assert when the control doesn't have a valid date initially (bug 1648192)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-02-02 23:41:54 +00:00
parent f30083b960
commit fa38bddf76

View File

@@ -259,7 +259,8 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
// we need to keep only the date part, times don't make sense for this
// control (in particular, comparisons with other dates would fail)
m_date = dt;
m_date.ResetTime();
if ( m_date.IsValid() )
m_date.ResetTime();
}
wxDateTime wxDatePickerCtrl::GetValue() const