1
0
Fork 0

[Editor] Prevent deferred tooltip update crash

Caused by `TreeItem`s being accessed after clearing the tree on reset.
This commit is contained in:
AThousandShips 2025-02-10 14:53:37 +01:00
parent 261e7d32d3
commit 4b4bfe7d0e
No known key found for this signature in database
GPG Key ID: DEFC5A5B1306947D
1 changed files with 3 additions and 0 deletions

View File

@ -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();
}