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)
This commit is contained in:
smix8 2022-06-14 13:04:02 +02:00 committed by Relintai
parent 8a60933e6d
commit 6a01f2b717

View File

@ -67,8 +67,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;