diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-23 09:58:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 09:58:51 +0200 |
commit | 21b51fdf7e17d84eaffa8f3016f8190ca660a3e4 (patch) | |
tree | 7272bbe54fcc57768e8b362449c1548847ba6e86 /editor | |
parent | 300edd0e781bcb161714255fc92a544970531ea8 (diff) | |
parent | 7fc3aa43ce39d8d12e57ec0585a9aed716f1ec24 (diff) |
Merge pull request #61826 from guilhermefelipecgs/fix_leak
Fix ObjectDB instances leaked on state machine when editor closes
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 2ba2466646..00cc5a6ca0 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -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(); } |