1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-09 13:11:25 +00:00

Fix a crash when dropping objects without a collision shape

This commit is contained in:
scrawl 2013-03-21 21:08:23 +01:00
parent 21cc7483e4
commit 3277ef26da

View file

@ -603,6 +603,14 @@ namespace Physic
btTransform trans;
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);
}
}
}}