mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 10:01:14 +02:00
Merge pull request #14346 from AndrewMeadows/fix-crash-19654
Case 19654: fix crash in btCollisionWorld::updateSingleAabb()
This commit is contained in:
commit
4489efa58b
2 changed files with 15 additions and 8 deletions
|
@ -305,7 +305,7 @@ bool ObjectMotionState::handleHardAndEasyChanges(uint32_t& flags, PhysicsEngine*
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if (_shape == newShape) {
|
if (_shape == newShape) {
|
||||||
// the shape didn't actually change, so we clear the DIRTY_SHAPE flag
|
// the shape didn't actually change, so we clear the DIRTY_SHAPE flag
|
||||||
flags &= ~Simulation::DIRTY_SHAPE;
|
flags &= ~Simulation::DIRTY_SHAPE;
|
||||||
|
@ -316,6 +316,7 @@ bool ObjectMotionState::handleHardAndEasyChanges(uint32_t& flags, PhysicsEngine*
|
||||||
setShape(newShape);
|
setShape(newShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (flags & EASY_DIRTY_PHYSICS_FLAGS) {
|
if (flags & EASY_DIRTY_PHYSICS_FLAGS) {
|
||||||
handleEasyChanges(flags);
|
handleEasyChanges(flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,6 +289,12 @@ void PhysicsEngine::processTransaction(PhysicsEngine::Transaction& transaction)
|
||||||
bumpAndPruneContacts(object);
|
bumpAndPruneContacts(object);
|
||||||
btRigidBody* body = object->getRigidBody();
|
btRigidBody* body = object->getRigidBody();
|
||||||
if (body) {
|
if (body) {
|
||||||
|
if (body->isStaticObject() && _activeStaticBodies.size() > 0) {
|
||||||
|
std::set<btRigidBody*>::iterator itr = _activeStaticBodies.find(body);
|
||||||
|
if (itr != _activeStaticBodies.end()) {
|
||||||
|
_activeStaticBodies.erase(itr);
|
||||||
|
}
|
||||||
|
}
|
||||||
removeDynamicsForBody(body);
|
removeDynamicsForBody(body);
|
||||||
_dynamicsWorld->removeRigidBody(body);
|
_dynamicsWorld->removeRigidBody(body);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue