diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-25 11:14:33 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-26 16:58:47 -0400 |
commit | 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 (patch) | |
tree | d8acd6c8d53717c3a4ec205b000ac8f0ff1fc985 /servers/physics | |
parent | 53c0010932f9c1becb63c16243f3a00ede359989 (diff) |
Added/Fixed null pointer checks
Diffstat (limited to 'servers/physics')
-rw-r--r-- | servers/physics/broad_phase_basic.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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; |