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