diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-09 15:37:14 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-09 15:37:14 +0200 |
commit | a1d7c62df7bfe52915336f83e4ca71d510bf3baf (patch) | |
tree | 2a409a0ba9235f8334e23222cc66bd5d0f08e32c /servers/physics_2d | |
parent | 336260b7b3eacc979fe0a891d1668e360d705781 (diff) | |
parent | f18aa00e8505439c1afc3dc0eb309429a88cf4de (diff) | |
download | redot-engine-a1d7c62df7bfe52915336f83e4ca71d510bf3baf.tar.gz |
Merge pull request #83003 from AThousandShips/null_check_extra
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/godot_area_2d.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/godot_body_2d.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/godot_physics_server_2d.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics_2d/godot_area_2d.cpp b/servers/physics_2d/godot_area_2d.cpp index 5371bccf26..d6c786706c 100644 --- a/servers/physics_2d/godot_area_2d.cpp +++ b/servers/physics_2d/godot_area_2d.cpp @@ -180,7 +180,7 @@ Variant GodotArea2D::get_param(PhysicsServer2D::AreaParameter p_param) const { } void GodotArea2D::_queue_monitor_update() { - ERR_FAIL_COND(!get_space()); + ERR_FAIL_NULL(get_space()); if (!monitor_query_list.in_list()) { get_space()->area_add_to_monitor_query_list(&monitor_query_list); diff --git a/servers/physics_2d/godot_body_2d.cpp b/servers/physics_2d/godot_body_2d.cpp index bd472a04ae..12c3e1e5b4 100644 --- a/servers/physics_2d/godot_body_2d.cpp +++ b/servers/physics_2d/godot_body_2d.cpp @@ -422,7 +422,7 @@ void GodotBody2D::integrate_forces(real_t p_step) { return; } - ERR_FAIL_COND(!get_space()); + ERR_FAIL_NULL(get_space()); int ac = areas.size(); diff --git a/servers/physics_2d/godot_physics_server_2d.cpp b/servers/physics_2d/godot_physics_server_2d.cpp index 112ba240b6..8df17992ea 100644 --- a/servers/physics_2d/godot_physics_server_2d.cpp +++ b/servers/physics_2d/godot_physics_server_2d.cpp @@ -994,7 +994,7 @@ void GodotPhysicsServer2D::body_set_pickable(RID p_body, bool p_pickable) { bool GodotPhysicsServer2D::body_test_motion(RID p_body, const MotionParameters &p_parameters, MotionResult *r_result) { GodotBody2D *body = body_owner.get_or_null(p_body); ERR_FAIL_NULL_V(body, false); - ERR_FAIL_COND_V(!body->get_space(), false); + ERR_FAIL_NULL_V(body->get_space(), false); ERR_FAIL_COND_V(body->get_space()->is_locked(), false); _update_shapes(); |