diff --git a/libraries/physics/src/PhysicalEntitySimulation.cpp b/libraries/physics/src/PhysicalEntitySimulation.cpp index 81f147540a..bc3c5eda44 100644 --- a/libraries/physics/src/PhysicalEntitySimulation.cpp +++ b/libraries/physics/src/PhysicalEntitySimulation.cpp @@ -194,8 +194,11 @@ void PhysicalEntitySimulation::handleOutgoingChanges(VectorOfMotionStates& motio ObjectMotionState* state = &(*stateItr); if (state && state->getType() == MOTION_STATE_TYPE_ENTITY) { EntityMotionState* entityState = static_cast(state); - _outgoingChanges.insert(entityState); - _entitiesToSort.insert(entityState->getEntity()); + EntityItem* entity = entityState->getEntity(); + if (entity) { + _outgoingChanges.insert(entityState); + _entitiesToSort.insert(entityState->getEntity()); + } } }