mirror of https://github.com/procxx/kepka.git
Fix possible crash in animations.
This commit is contained in:
parent
b3f5973329
commit
e0d4884351
|
@ -234,8 +234,11 @@ TG_FORCE_INLINE bool Basic::animating() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
TG_FORCE_INLINE bool Basic::call(crl::time now) 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;
|
const auto onstack = _callback;
|
||||||
return onstack(now);
|
return onstack(std::max(_started, now));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Basic::~Basic() {
|
inline Basic::~Basic() {
|
||||||
|
|
Loading…
Reference in New Issue