Fix crash when selecting ownerless 3D node.

This commit is contained in:
Saracen 2024-08-28 04:35:46 +01:00
parent a2f097d603
commit 279ccd6d32
1 changed files with 1 additions and 1 deletions

View File

@ -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 (clicked_wants_append) {
if (editor_selection->is_selected(selected)) { if (editor_selection->is_selected(selected)) {
editor_selection->remove_node(selected); editor_selection->remove_node(selected);