diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 008b1295ceb..f0be8791d31 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -770,7 +770,7 @@ void Node3DEditorViewport::_select_clicked(bool p_allow_locked) { } } - if (p_allow_locked || !_is_node_locked(selected)) { + if (p_allow_locked || (selected != nullptr && !_is_node_locked(selected))) { if (clicked_wants_append) { if (editor_selection->is_selected(selected)) { editor_selection->remove_node(selected);