diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index a4c21d0771..5af721c433 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -1609,6 +1609,7 @@ unsigned long wxDateTime::GetAsDOS() const time_t ticks = GetTicks(); struct tm tmstruct; struct tm *tm = wxLocaltime_r(&ticks, &tmstruct); + wxCHECK_MSG( tm, ULONG_MAX, _T("time can't be represented in DOS format") ); long year = tm->tm_year; year -= 80;