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.
This commit is contained in:
Nathan Letwory 2004-08-01 09:00:36 +00:00
parent 59765b488e
commit f1fdc6d608

@ -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;
}