Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
This commit is contained in:
@ -194,7 +194,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);
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user