mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +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:
commit
21b51fdf7e
3 changed files with 17 additions and 17 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue