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 committed 2015-01-22 18:28:00 -08:00
1 parent a159fbac69
commit 51f41d0cfc
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -235,7 +235,7 @@ static bool visualWireframe=false;
static bool renderVisualGeometry=true;
static bool renderGrid = true;
int gDebugDrawFlags = 0;
static bool pauseSimulation=true;
static bool pauseSimulation=false;
int midiBaseIndex = 176;
extern bool gDisableDeactivation;
@@ -616,7 +616,8 @@ void FeatherstoneDemo1::physicsDebugDraw(int debugDrawFlags)
{
if (m_dynamicsWorld)
{
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags);
if (m_dynamicsWorld->getDebugDrawer())
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags);
m_dynamicsWorld->debugDrawWorld();
}
}