1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #5467

TriKriSta (1):
      fix: check valid date in getDateWhereFindPhrase
This commit is contained in:
sudden6 2018-12-26 23:20:57 +01:00
commit ed821462c9
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -540,6 +540,11 @@ QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTi
}
QDateTime date = from;
if (!date.isValid()) {
date = QDateTime::currentDateTime();
}
if (parameter.period == PeriodSearch::AfterDate || parameter.period == PeriodSearch::BeforeDate) {
date = QDateTime(parameter.date);
}