Fix BehaviorTreeView::update_tree null data crash

This commit is contained in:
Wilson E. Alvarez 2024-03-07 11:47:32 -05:00
parent 25c72302ca
commit dd837ff472
No known key found for this signature in database
GPG Key ID: A32174A3D2ED3F9E
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);