BGE Animations: Fixing a crash with "IPO" animations on an object with modifiers.

This commit is contained in:
Mitchell Stokes 2011-07-20 06:20:49 +00:00
parent 71eda5ca4d
commit abb3f8c80b

@ -155,7 +155,7 @@ bool BL_Action::Play(const char* name,
BL_DeformableGameObject *obj = (BL_DeformableGameObject*)m_obj;
BL_ShapeDeformer *shape_deformer = dynamic_cast<BL_ShapeDeformer*>(obj->GetDeformer());
if (shape_deformer)
if (shape_deformer && shape_deformer->GetKey())
{
obj->GetShape(m_blendinshape);
@ -363,7 +363,7 @@ void BL_Action::Update(float curtime)
BL_ShapeDeformer *shape_deformer = dynamic_cast<BL_ShapeDeformer*>(obj->GetDeformer());
// Handle shape actions if we have any
if (shape_deformer)
if (shape_deformer && shape_deformer->GetKey())
{
Key *key = shape_deformer->GetKey();