1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 15:23:58 +00:00

Added check before removing water collision object from world

This commit is contained in:
Aussiemon 2016-12-14 20:13:23 -07:00
parent e30dfb13d3
commit 7c2a088b34

View file

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