Skip to content

Commit

Permalink
Fix: Keep BTInstance alive until update is finished
Browse files Browse the repository at this point in the history
Fixes #254
limbonaut committed Dec 4, 2024
1 parent 6644f19 commit 23a6e5f
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
@@ -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);

0 comments on commit 23a6e5f

Please sign in to comment.