Prevent errors if Tween callback's object is freed
This commit is contained in:
parent
247c3548d8
commit
598d9972c8
3 changed files with 10 additions and 0 deletions
|
|
@ -675,6 +675,10 @@ bool CallbackTweener::step(double &r_delta) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!callback.get_object()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
elapsed_time += r_delta;
|
||||
if (elapsed_time >= delay) {
|
||||
Variant result;
|
||||
|
|
@ -736,6 +740,10 @@ bool MethodTweener::step(double &r_delta) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!callback.get_object()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
elapsed_time += r_delta;
|
||||
|
||||
if (elapsed_time < delay) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue