1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Ignore invalid dates

fixes #416
This commit is contained in:
Martin Tůma 2022-01-03 23:21:55 +01:00
parent 40616fb868
commit c4e0ff6435

View File

@ -138,11 +138,8 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
if (list.size() > 5) {
QDateTime ts(timestamp(list.at(4), list.at(5)));
if (!ts.isValid()) {
_errorString = "Invalid date/time";
return false;
}
t.setTimestamp(ts);
if (ts.isValid())
t.setTimestamp(ts);
}
if (list.size() > 7) {
qreal elevation = list.at(7).toDouble(&ok);