Merge pull request #68 from Rubonnek/fix-btview-update-crash
Fix `BehaviorTreeView::update_tree` null data crash
This commit is contained in:
commit
b90b85f0c3
|
@ -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) {
|
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_data = p_data;
|
||||||
update_pending = true;
|
update_pending = true;
|
||||||
_notification(NOTIFICATION_PROCESS);
|
_notification(NOTIFICATION_PROCESS);
|
||||||
|
|
Loading…
Reference in New Issue