summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwin.coumans@gmail.com>2019-04-03 07:32:06 -0700
committerGitHub <noreply@github.com>2019-04-03 07:32:06 -0700
commit62add41ab4723707777d83c88a299b85c95f2684 (patch)
tree36403a1cec2196a9fd687337fde17d514033a9e0
parent0e232578552065e7a8576582174cdc63ca05f377 (diff)
parent231195843f25a728f8c9acc663453e909f995f23 (diff)
downloadbullet3-62add41ab4723707777d83c88a299b85c95f2684.tar.gz
Merge pull request #2180 from stephengold/master
in btSimpleBroadphase::destroyProxy(), remove pairs before freeing proxy
-rw-r--r--src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
index 166cf771f..b7fe0a1f3 100644
--- a/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
+++ b/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
@@ -123,11 +123,11 @@ protected:
void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg, btDispatcher* dispatcher)
{
+ m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg, dispatcher);
+
btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxyOrg);
freeHandle(proxy0);
- m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg, dispatcher);
-
//validate();
}