Skip to content

Commit

Permalink
Merge pull request bulletphysics#4119 from erwincoumans/master
Browse files Browse the repository at this point in the history
move the mutex lock to include the 'getNewManifold', dealing with Iss…
  • Loading branch information
erwincoumans authored Jan 4, 2022
2 parents f84b523 + 5d1c8a2 commit dc72081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dc72081

Please sign in to comment.