From 231195843f25a728f8c9acc663453e909f995f23 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Tue, 2 Apr 2019 21:51:58 -0700 Subject: [PATCH] in btSimpleBroadphase::destroyProxy(), remove pairs before freeing proxy --- .../BroadphaseCollision/btSimpleBroadphase.cpp | 4 ++-- 1 file 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(proxyOrg); freeHandle(proxy0); - m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg, dispatcher); - //validate(); }