1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Merge pull request #61826 from guilhermefelipecgs/fix_leak

Fix ObjectDB instances leaked on state machine when editor closes
This commit is contained in:
Rémi Verschelde
2022-06-23 09:58:51 +02:00
committed by GitHub
3 changed files with 17 additions and 17 deletions

View File

@@ -817,11 +817,11 @@ bool AnimationNodeStateMachineEditor::_create_submenu(PopupMenu *p_menu, Ref<Ani
Vector<Ref<AnimationNodeStateMachine>> parents = p_parents;
if (from_root) {
Ref<AnimationNodeStateMachine> prev = p_nodesm->get_prev_state_machine();
AnimationNodeStateMachine *prev = p_nodesm->get_prev_state_machine();
while (prev.is_valid()) {
while (prev != nullptr) {
parents.push_back(prev);
p_nodesm = prev;
p_nodesm = Ref<AnimationNodeStateMachine>(prev);
prev_path += "../";
prev = prev->get_prev_state_machine();
}