mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible crash in animations.
This commit is contained in:
@@ -234,8 +234,11 @@ TG_FORCE_INLINE bool Basic::animating() const {
|
||||
}
|
||||
|
||||
TG_FORCE_INLINE bool Basic::call(crl::time now) const {
|
||||
Expects(_started >= 0);
|
||||
|
||||
// _started may be greater than now if we called restart while iterating.
|
||||
const auto onstack = _callback;
|
||||
return onstack(now);
|
||||
return onstack(std::max(_started, now));
|
||||
}
|
||||
|
||||
inline Basic::~Basic() {
|
||||
|
||||
Reference in New Issue
Block a user