Merge pull request #68 from Rubonnek/fix-btview-update-crash

Fix `BehaviorTreeView::update_tree` null data crash
This commit is contained in:
Serhii Snitsaruk 2024-03-07 20:32:58 +01:00 committed by GitHub
commit b90b85f0c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ inline void _item_set_elapsed_time(TreeItem *p_item, double p_elapsed) {
}
void BehaviorTreeView::update_tree(const Ref<BehaviorTreeData> &p_data) {
ERR_FAIL_COND_MSG(p_data.is_null(), "Invalid data. View won't update.");
update_data = p_data;
update_pending = true;
_notification(NOTIFICATION_PROCESS);