summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwincoumans@google.com>2022-01-03 16:13:27 -0800
committerGitHub <noreply@github.com>2022-01-03 16:13:27 -0800
commitdc72081eb19831e5b28b071dc76ec51fc1fe9451 (patch)
tree4e27cc43e3520a11850bb82f4b9925511b46d62e
parentf84b523c0583edd5a667ca867d5e533521a3cbbc (diff)
parent5d1c8a2ecef76e98ee9dec5e80ff746f36a444bd (diff)
downloadbullet3-dc72081eb19831e5b28b071dc76ec51fc1fe9451.tar.gz
Merge pull request #4119 from erwincoumans/master
move the mutex lock to include the 'getNewManifold', dealing with Iss…
-rw-r--r--src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
index fb15ae31e..9e99c154f 100644
--- a/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
+++ b/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
@@ -902,8 +902,8 @@ void btDiscreteDynamicsWorld::createPredictiveContactsInternal(btRigidBody** bod
btVector3 distVec = (predictedTrans.getOrigin() - body->getWorldTransform().getOrigin()) * sweepResults.m_closestHitFraction;
btScalar distance = distVec.dot(-sweepResults.m_hitNormalWorld);
- btPersistentManifold* manifold = m_dispatcher1->getNewManifold(body, sweepResults.m_hitCollisionObject);
btMutexLock(&m_predictiveManifoldsMutex);
+ btPersistentManifold* manifold = m_dispatcher1->getNewManifold(body, sweepResults.m_hitCollisionObject);
m_predictiveManifolds.push_back(manifold);
btMutexUnlock(&m_predictiveManifoldsMutex);