1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Merge pull request #61453 from m3g4d1v3r/master

Fix #61444: Executing Tree.scroll_to_item crashes Godot
This commit is contained in:
Rémi Verschelde
2022-05-31 12:28:50 +02:00
committed by GitHub

View File

@@ -4523,6 +4523,7 @@ Point2 Tree::get_scroll() const {
}
void Tree::scroll_to_item(TreeItem *p_item, bool p_center_on_item) {
ERR_FAIL_NULL(p_item);
if (!is_visible_in_tree() || !p_item->is_visible()) {
return; // Hack to work around crash in get_item_rect() if Tree is not in tree.
}