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
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue