Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2004-08-01 13:00:36 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2004-08-01 13:00:36 +0400
commitf1fdc6d608d7c86daee516e9bdfc74f033f1ca9d (patch)
treeed03055dc7d49134c5849edbfa2e80ea661539cb
parent59765b488ec917a419ae8117d306ddd8cf74227c (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.
-rw-r--r--source/gameengine/Physics/Sumo/SumoPhysicsController.cpp2
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;
}