diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index 7e6e0a12a..11041e3a2 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -9693,7 +9693,10 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec,const void PhysicsServerCommandProcessor::resetSimulation() { //clean up all data - m_data->m_dynamicsWorld->getWorldInfo().m_sparsesdf.Reset(); + if (m_data && m_data->m_dynamicsWorld) + { + m_data->m_dynamicsWorld->getWorldInfo().m_sparsesdf.Reset(); + } if (m_data && m_data->m_guiHelper) { m_data->m_guiHelper->removeAllGraphicsInstances();