Check for null

This commit is contained in:
Jan Matas
2018-04-30 19:01:53 +01:00
parent 21418934e0
commit b1f85268f0

View File

@@ -9693,7 +9693,10 @@ void PhysicsServerCommandProcessor::stepSimulationRealTime(double dtInSec,const
void PhysicsServerCommandProcessor::resetSimulation() void PhysicsServerCommandProcessor::resetSimulation()
{ {
//clean up all data //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) if (m_data && m_data->m_guiHelper)
{ {
m_data->m_guiHelper->removeAllGraphicsInstances(); m_data->m_guiHelper->removeAllGraphicsInstances();