From b0a8bcdf4981b0991c83b6b96b0fb70a06c56f61 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Tue, 14 Jun 2022 13:04:02 +0200 Subject: [PATCH] Fix crash of navigation agents callback when object is invalid Fix crash of navigation agents callback when object is invalid. (cherry picked from commit bc38ebe4f07724850095094873d1b42bf914c6f3) --- modules/navigation/rvo_agent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/navigation/rvo_agent.cpp b/modules/navigation/rvo_agent.cpp index a295bd56f36..2bec4c95d08 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(0); + return; } Variant::CallError responseCallError;