Fix nullptr crash

This commit is contained in:
Serhii Snitsaruk 2024-01-28 22:00:47 +01:00
parent de8d3abbc8
commit c44648c69c
1 changed files with 3 additions and 1 deletions

View File

@ -721,7 +721,9 @@ void LimboAIEditor::_on_header_pressed() {
_update_header();
task_tree->deselect();
#ifdef LIMBOAI_MODULE
task_tree->get_bt()->editor_set_section_unfold("blackboard_plan", true);
if (task_tree->get_bt().is_valid()) {
task_tree->get_bt()->editor_set_section_unfold("blackboard_plan", true);
}
#endif // LIMBOAI_MODULE
EDIT_RESOURCE(task_tree->get_bt());
}