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

fix: check valid date in getDateWhereFindPhrase

This commit is contained in:
TriKriSta 2018-12-22 00:36:38 +02:00
parent ea9f429838
commit c3095ab150

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);
}