don't crash when no debugdrawer is available, added some damping for the constraint demo

This commit is contained in:
ejcoumans
2006-09-30 03:16:02 +00:00
parent 45386e05dc
commit 62bdd2bde2
2 changed files with 3 additions and 1 deletions

View File

@@ -335,7 +335,8 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y)
break;
}
getDynamicsWorld()->getDebugDrawer()->setDebugMode(m_debugMode);
if (getDynamicsWorld()->getDebugDrawer())
getDynamicsWorld()->getDebugDrawer()->setDebugMode(m_debugMode);
glutPostRedisplay();