Fix a crash when dropping objects without a collision shape

actorid
scrawl 12 years ago
parent 21cc7483e4
commit 3277ef26da

@ -603,6 +603,14 @@ namespace Physic
btTransform trans; btTransform trans;
trans.setIdentity(); trans.setIdentity();
shape->mCollisionShape->getAabb(trans, min, max); if (shape->mRaycastingShape)
shape->mRaycastingShape->getAabb(trans, min, max);
else if (shape->mCollisionShape)
shape->mCollisionShape->getAabb(trans, min, max);
else
{
min = btVector3(0,0,0);
max = btVector3(0,0,0);
}
} }
}} }}

Loading…
Cancel
Save