From bc38ebe4f07724850095094873d1b42bf914c6f3 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: Fix crash of navigation agents callback when object is invalid Fix crash of navigation agents callback when object is invalid. --- modules/navigation/rvo_agent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') 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; -- cgit v1.2.3