Explorar o código

Merge pull request #14529 from Smjert/fix/scene-tree-editor-crash

Fix SceneTreeEditor crashing when calling _deselect_items
Rémi Verschelde %!s(int64=7) %!d(string=hai) anos
pai
achega
40250c2434
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      editor/scene_tree_editor.cpp

+ 2 - 1
editor/scene_tree_editor.cpp

@@ -484,7 +484,8 @@ void SceneTreeEditor::_selected_changed() {
 void SceneTreeEditor::_deselect_items() {
 
 	// Clear currently elected items in scene tree dock.
-	editor_selection->clear();
+	if (editor_selection)
+		editor_selection->clear();
 }
 
 void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_selected) {