Fix possible Tween leak on exit

(cherry picked from commit e173710963)
This commit is contained in:
Haoyu Qiu 2022-12-15 19:09:09 +08:00 committed by Rémi Verschelde
parent a204af90d5
commit d13e327abe
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -749,6 +749,12 @@ void SceneTree::finish() {
E->get()->release_connections();
}
timers.clear();
// Cleanup tweens.
for (List<Ref<SceneTreeTween>>::Element *E = tweens.front(); E; E = E->next()) {
E->get()->clear();
}
tweens.clear();
}
void SceneTree::quit(int p_exit_code) {