From 279ccd6d322a50d5513d785af437ac79825a119b Mon Sep 17 00:00:00 2001 From: Saracen Date: Wed, 28 Aug 2024 04:35:46 +0100 Subject: [PATCH] Fix crash when selecting ownerless 3D node. --- editor/plugins/node_3d_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index d911e745db6..8d484e3f3a1 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);