mirror of
https://github.com/godotengine/godot.git
synced 2025-01-30 21:33:18 +08:00
BulletPhysicsServer::area_get_space: null check
This is now the same as e.g. body_get_space.
(cherry picked from commit 79317f9cb1
)
This commit is contained in:
parent
b95221fb0a
commit
3850d6db76
@ -253,7 +253,12 @@ void BulletPhysicsServer::area_set_space(RID p_area, RID p_space) {
|
||||
|
||||
RID BulletPhysicsServer::area_get_space(RID p_area) const {
|
||||
AreaBullet *area = area_owner.get(p_area);
|
||||
return area->get_space()->get_self();
|
||||
ERR_FAIL_COND_V(!area, RID());
|
||||
SpaceBullet *space = area->get_space();
|
||||
if (!space) {
|
||||
return RID();
|
||||
}
|
||||
return space->get_self();
|
||||
}
|
||||
|
||||
void BulletPhysicsServer::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
|
||||
|
Loading…
Reference in New Issue
Block a user