mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix possible crash in animations.
This commit is contained in:
parent
b3f5973329
commit
e0d4884351
1 changed files with 4 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue