From 51f41d0cfcf7638437e6c4e25d8d54c6ee9a2de4 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 22 Jan 2015 18:28:00 -0800 Subject: [PATCH] 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) --- Demos3/AllBullet2Demos/main.cpp | 2 +- .../bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Demos3/AllBullet2Demos/main.cpp b/Demos3/AllBullet2Demos/main.cpp index 41c7e0b19..4aa9e6ce6 100644 --- a/Demos3/AllBullet2Demos/main.cpp +++ b/Demos3/AllBullet2Demos/main.cpp @@ -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; diff --git a/Demos3/bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp b/Demos3/bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp index f652ba625..61f6a97c1 100644 --- a/Demos3/bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp +++ b/Demos3/bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.cpp @@ -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(); } }