1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix ObjectDB instances leaked on state machine when editor closes

This commit is contained in:
Guilherme Felipe de C. G. da Silva
2022-06-07 23:06:45 -03:00
parent 3f8d86b076
commit 7fc3aa43ce
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();
}