set broadphase handle to zero when destructing a btCollisionWorld, just in case a collision object/ rigid body is re-used.

Thanks to Ole for reporting

Fix a bug , causing some deep penetrations to be missed. Not likely to have impacted many users, as such deep penetrations should have prevented in the first place.
Thanks a lot to Andy O'Neil for reporting and reproduction case.
This commit is contained in:
erwin.coumans
2008-12-05 22:40:13 +00:00
parent b89b71b38d
commit 635e1a6aa0
2 changed files with 3 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ btCollisionWorld::~btCollisionWorld()
//
getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1);
getBroadphase()->destroyProxy(bp,m_dispatcher1);
collisionObject->setBroadphaseHandle(0);
}
}