diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2004-08-01 13:00:36 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2004-08-01 13:00:36 +0400 |
commit | f1fdc6d608d7c86daee516e9bdfc74f033f1ca9d (patch) | |
tree | ed03055dc7d49134c5849edbfa2e80ea661539cb /source/gameengine | |
parent | 59765b488ec917a419ae8117d306ddd8cf74227c (diff) |
Under certain circumstances a null-pointer could get dereferenced. Disabling 'dynamic' on an object was one of the situations. Now checking before using.
NULL->m_mass never works, of course :)
Ryan Showalter spotted and located the problem.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Physics/Sumo/SumoPhysicsController.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp b/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp index 8638c0a610a..87513f1a18c 100644 --- a/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp +++ b/source/gameengine/Physics/Sumo/SumoPhysicsController.cpp @@ -78,7 +78,7 @@ float SumoPhysicsController::getMass() if (m_sumoObj) { const SM_ShapeProps *shapeprops = m_sumoObj->getShapeProps(); - return shapeprops->m_mass; + if(shapeprops!=NULL) return shapeprops->m_mass; } return 0.f; } |