mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Fix possible crash in stories.
This commit is contained in:
@@ -312,7 +312,7 @@ void Stories::scheduleExpireTimer() {
|
|||||||
const auto nearest = _expiring.front().first;
|
const auto nearest = _expiring.front().first;
|
||||||
const auto now = base::unixtime::now();
|
const auto now = base::unixtime::now();
|
||||||
const auto delay = (nearest > now)
|
const auto delay = (nearest > now)
|
||||||
? (nearest - now)
|
? std::min(nearest - now, 86'400)
|
||||||
: 0;
|
: 0;
|
||||||
_expireTimer.callOnce(delay * crl::time(1000));
|
_expireTimer.callOnce(delay * crl::time(1000));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user