diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2022-06-14 13:04:02 +0200 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2022-06-14 13:04:02 +0200 |
commit | bc38ebe4f07724850095094873d1b42bf914c6f3 (patch) | |
tree | eefb7bbe050c25f6eea627be44571cb4d7512dc5 /modules/navigation/rvo_agent.cpp | |
parent | 126e4d0a5b182a2eea4e49e21344e376acdbba8c (diff) |
Fix crash of navigation agents callback when object is invalid
Fix crash of navigation agents callback when object is invalid.
Diffstat (limited to 'modules/navigation/rvo_agent.cpp')
-rw-r--r-- | modules/navigation/rvo_agent.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/navigation/rvo_agent.cpp b/modules/navigation/rvo_agent.cpp index a6a5660c0c..4ec72ad43f 100644 --- a/modules/navigation/rvo_agent.cpp +++ b/modules/navigation/rvo_agent.cpp @@ -65,8 +65,9 @@ void RvoAgent::dispatch_callback() { return; } Object *obj = ObjectDB::get_instance(callback.id); - if (obj == nullptr) { + if (!obj) { callback.id = ObjectID(); + return; } Callable::CallError responseCallError; |