From 8a98639d7820f3ec5195cd9a46ef4dc2f777fe61 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Wed, 31 Jan 2007 20:57:14 +0000 Subject: [PATCH] fixed a crashing bug (NULL strings) and change the viewing angle of default camera in the demo --- Demos/ColladaDemo/ColladaConverter.cpp | 2 +- Demos/ColladaDemo/ColladaDemo.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Demos/ColladaDemo/ColladaConverter.cpp b/Demos/ColladaDemo/ColladaConverter.cpp index e3f4fb0cc..2466958a1 100644 --- a/Demos/ColladaDemo/ColladaConverter.cpp +++ b/Demos/ColladaDemo/ColladaConverter.cpp @@ -947,7 +947,7 @@ void ColladaConverter::ConvertRigidBodyRef( btRigidBodyInput& rbInput,btRigidBod { daeElementRef elemRef = elemRefArray[u]; daeString elemName = elemRef->getElementName(); - if (!strcmp(elemName,"kinematic")) + if (elemName && !strcmp(elemName,"kinematic")) { daeMemoryRef memRef = elemRef->getValuePointer(); diff --git a/Demos/ColladaDemo/ColladaDemo.cpp b/Demos/ColladaDemo/ColladaDemo.cpp index 2b38d8605..89a86400a 100644 --- a/Demos/ColladaDemo/ColladaDemo.cpp +++ b/Demos/ColladaDemo/ColladaDemo.cpp @@ -167,6 +167,7 @@ int main(int argc,char** argv) void ColladaDemo::initPhysics(const char* filename) { m_cameraUp = btVector3(0,0,1); + m_ele = 60; m_forwardAxis = 1; btCollisionDispatcher* dispatcher = new btCollisionDispatcher();