diff --git a/src/persistence/history.cpp b/src/persistence/history.cpp index 573d4f767..7aa60d842 100644 --- a/src/persistence/history.cpp +++ b/src/persistence/history.cpp @@ -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); }