From 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Fri, 25 Aug 2017 11:14:33 -0400 Subject: Added/Fixed null pointer checks --- servers/physics/broad_phase_basic.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'servers/physics') diff --git a/servers/physics/broad_phase_basic.cpp b/servers/physics/broad_phase_basic.cpp index 05a2e1fdf8..5a54e1f0d9 100644 --- a/servers/physics/broad_phase_basic.cpp +++ b/servers/physics/broad_phase_basic.cpp @@ -30,17 +30,14 @@ #include "broad_phase_basic.h" #include "list.h" #include "print_string.h" -BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object_, int p_subindex) { +BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex) { - if (p_object_ == NULL) { - - ERR_FAIL_COND_V(p_object_ == NULL, 0); - } + ERR_FAIL_COND_V(p_object == NULL, NULL); current++; Element e; - e.owner = p_object_; + e.owner = p_object; e._static = false; e.subindex = p_subindex; -- cgit v1.2.3