Selaa lähdekoodia

[Editor] Prevent deferred tooltip update crash

Caused by `TreeItem`s being accessed after clearing the tree on reset.
AThousandShips 7 kuukautta sitten
vanhempi
commit
4b4bfe7d0e
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      editor/gui/scene_tree_editor.cpp

+ 3 - 0
editor/gui/scene_tree_editor.cpp

@@ -1170,6 +1170,9 @@ void SceneTreeEditor::_compute_hash(Node *p_node, uint64_t &hash) {
 }
 
 void SceneTreeEditor::_reset() {
+	// Stop any waiting change to tooltip.
+	update_node_tooltip_delay->stop();
+
 	tree->clear();
 	node_cache.clear();
 }