mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
fix asserts on domain switch
This commit is contained in:
parent
c62a701a2d
commit
8f65813924
2 changed files with 1 additions and 2 deletions
|
@ -62,7 +62,7 @@ EntityItem::EntityItem(const EntityItemID& entityItemID) :
|
|||
EntityItem::~EntityItem() {
|
||||
// these pointers MUST be correct at delete, else we probably have a dangling backpointer
|
||||
// to this EntityItem in the corresponding data structure.
|
||||
assert(!_simulated);
|
||||
assert(!_simulated || (!_element && !_physicsInfo));
|
||||
assert(!_element);
|
||||
assert(!_physicsInfo);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,6 @@ void PhysicalEntitySimulation::clearEntitiesInternal() {
|
|||
EntityMotionState* motionState = static_cast<EntityMotionState*>(&(*stateItr));
|
||||
assert(motionState);
|
||||
EntityItemPointer entity = motionState->getEntity();
|
||||
entity->setPhysicsInfo(nullptr);
|
||||
// TODO: someday when we invert the entities/physics lib dependencies we can let EntityItem delete its own PhysicsInfo
|
||||
// until then we must do it here
|
||||
delete motionState;
|
||||
|
|
Loading…
Reference in a new issue