diff options
Diffstat (limited to 'editor/plugins')
-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 ece0c6a0ce..b2c5450aaa 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(); } |