mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-10 04:52:43 +02:00
Merge pull request #13062 from sethalves/fix-physics-crash-on-exit
fix physics related crash-on-exit
This commit is contained in:
commit
c3e531dda1
1 changed files with 2 additions and 1 deletions
|
@ -153,6 +153,8 @@ void PhysicalEntitySimulation::clearEntitiesInternal() {
|
|||
// remove the objects (aka MotionStates) from physics
|
||||
_physicsEngine->removeSetOfObjects(_physicalObjects);
|
||||
|
||||
clearOwnershipData();
|
||||
|
||||
// delete the MotionStates
|
||||
for (auto stateItr : _physicalObjects) {
|
||||
EntityMotionState* motionState = static_cast<EntityMotionState*>(&(*stateItr));
|
||||
|
@ -165,7 +167,6 @@ void PhysicalEntitySimulation::clearEntitiesInternal() {
|
|||
_physicalObjects.clear();
|
||||
|
||||
// clear all other lists specific to this derived class
|
||||
clearOwnershipData();
|
||||
_entitiesToRemoveFromPhysics.clear();
|
||||
_entitiesToAddToPhysics.clear();
|
||||
_incomingChanges.clear();
|
||||
|
|
Loading…
Reference in a new issue