Fix crash of navigation agents callback when object is invalid
Fix crash of navigation agents callback when object is invalid.
(cherry picked from commit bc38ebe4f0
)
This commit is contained in:
parent
6ecdef84cf
commit
b0a8bcdf49
1 changed files with 2 additions and 1 deletions
|
@ -65,8 +65,9 @@ void RvoAgent::dispatch_callback() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Object *obj = ObjectDB::get_instance(callback.id);
|
Object *obj = ObjectDB::get_instance(callback.id);
|
||||||
if (obj == nullptr) {
|
if (!obj) {
|
||||||
callback.id = ObjectID(0);
|
callback.id = ObjectID(0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::CallError responseCallError;
|
Variant::CallError responseCallError;
|
||||||
|
|
Loading…
Reference in a new issue