Added check before removing water collision object from world

pull/113/head
Aussiemon 8 years ago
parent e30dfb13d3
commit 7c2a088b34

@ -1463,7 +1463,10 @@ namespace MWPhysics
{
if (mWaterCollisionObject.get())
{
mCollisionWorld->removeCollisionObject(mWaterCollisionObject.get());
if (mWaterCollisionObject.get()->getWorldArrayIndex() >= 0)
{
mCollisionWorld->removeCollisionObject(mWaterCollisionObject.get());
}
}
if (!mWaterEnabled)

Loading…
Cancel
Save