diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index f2a13d143a..94f5906fed 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -125,12 +125,9 @@ public: { wxASSERT(pDt); - if ( !s.empty() ) - { - pDt->ParseFormat(s, m_format); - if ( !pDt->IsValid() ) - return false; - } + pDt->ParseFormat(s, m_format); + if ( !pDt->IsValid() ) + return false; return true; } @@ -253,7 +250,7 @@ private: virtual void SetStringValue(const wxString& s) wxOVERRIDE { wxDateTime dt; - if ( !s.empty() && ParseDateTime(s, &dt) ) + if ( ParseDateTime(s, &dt) ) SetDate(dt); //else: keep the old value }