fix issue, when debug drawer doesn't exist don't try to use it

enable simulation by default (was accidently switched off at startup of AllBullet2Demos)
This commit is contained in:
Erwin Coumans
2015-01-22 18:28:00 -08:00
parent a159fbac69
commit 51f41d0cfc
2 changed files with 3 additions and 2 deletions

View File

@@ -235,7 +235,7 @@ static bool visualWireframe=false;
static bool renderVisualGeometry=true; static bool renderVisualGeometry=true;
static bool renderGrid = true; static bool renderGrid = true;
int gDebugDrawFlags = 0; int gDebugDrawFlags = 0;
static bool pauseSimulation=true; static bool pauseSimulation=false;
int midiBaseIndex = 176; int midiBaseIndex = 176;
extern bool gDisableDeactivation; extern bool gDisableDeactivation;

View File

@@ -616,7 +616,8 @@ void FeatherstoneDemo1::physicsDebugDraw(int debugDrawFlags)
{ {
if (m_dynamicsWorld) if (m_dynamicsWorld)
{ {
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags); if (m_dynamicsWorld->getDebugDrawer())
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags);
m_dynamicsWorld->debugDrawWorld(); m_dynamicsWorld->debugDrawWorld();
} }
} }