Fix issue in ContactManifoldSet
This commit is contained in:
parent
38eff07d0d
commit
37e2c79cf2
|
@ -239,6 +239,9 @@ void ContactManifoldSet::createManifold(const ContactManifoldInfo* manifoldInfo)
|
||||||
ContactManifold(manifoldInfo, mShape1, mShape2, mMemoryAllocator);
|
ContactManifold(manifoldInfo, mShape1, mShape2, mMemoryAllocator);
|
||||||
manifold->setPrevious(nullptr);
|
manifold->setPrevious(nullptr);
|
||||||
manifold->setNext(mManifolds);
|
manifold->setNext(mManifolds);
|
||||||
|
if (mManifolds != nullptr) {
|
||||||
|
mManifolds->setPrevious(manifold);
|
||||||
|
}
|
||||||
mManifolds = manifold;
|
mManifolds = manifold;
|
||||||
|
|
||||||
mNbManifolds++;
|
mNbManifolds++;
|
||||||
|
@ -248,6 +251,7 @@ void ContactManifoldSet::createManifold(const ContactManifoldInfo* manifoldInfo)
|
||||||
void ContactManifoldSet::removeManifold(ContactManifold* manifold) {
|
void ContactManifoldSet::removeManifold(ContactManifold* manifold) {
|
||||||
|
|
||||||
assert(mNbManifolds > 0);
|
assert(mNbManifolds > 0);
|
||||||
|
assert(manifold != nullptr);
|
||||||
|
|
||||||
ContactManifold* previous = manifold->getPrevious();
|
ContactManifold* previous = manifold->getPrevious();
|
||||||
ContactManifold* next = manifold->getNext();
|
ContactManifold* next = manifold->getNext();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user