Skip to content

Commit

Permalink
Merge pull request #172 from limbonaut/fix-btplayer-restart-crash
Browse files Browse the repository at this point in the history
Fix BTPlayer.restart() crash
  • Loading branch information
limbonaut authored Jul 30, 2024
2 parents 186ee3c + 456687c commit 17eb029
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bt/bt_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 17eb029

Please sign in to comment.