Fix crash of navigation agents callback when object is invalid

Fix crash of navigation agents callback when object is invalid.
This commit is contained in:
smix8 2022-06-14 13:04:02 +02:00
parent 126e4d0a5b
commit bc38ebe4f0

View file

@ -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;