diff --git a/bt/bt_player.cpp b/bt/bt_player.cpp index 3f8cc23..ad0b515 100644 --- a/bt/bt_player.cpp +++ b/bt/bt_player.cpp @@ -144,6 +144,7 @@ void BTPlayer::update(double p_delta) { } void BTPlayer::restart() { + ERR_FAIL_COND_MSG(tree_instance.is_null(), "BTPlayer: Restart failed - no valid tree instance. Make sure the BTPlayer has a valid behavior tree with a valid root task."); tree_instance->abort(); set_active(true); }