Skip to content

Commit

Permalink
Keep BTInstance alive until update is finished (fixes #254)
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Dec 4, 2024
1 parent 6644f19 commit e7c8a9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bt/bt_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ BT::Status BTInstance::update(double p_delta) {
double start = Time::get_singleton()->get_ticks_usec();
#endif

const Ref<BTInstance> keep_alive {this}; // keep instance alive until update is finished
last_status = root_task->execute(p_delta);
emit_signal(LW_NAME(updated), last_status);

Expand Down

0 comments on commit e7c8a9c

Please sign in to comment.