Merge pull request #96199 from SaracenOne/ownerless_node_crashfix

Fix crash when selecting ownerless 3D node.
This commit is contained in:
Rémi Verschelde 2024-08-28 09:45:44 +02:00
commit 35be8acf60
No known key found for this signature in database
GPG Key ID: C3336907360768E1
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);