avoid crash when no tree data is available

This commit is contained in:
erwin coumans
2013-04-19 23:53:24 -07:00
parent fbd192f360
commit 1179da4f9d
2 changed files with 6 additions and 2 deletions

View File

@@ -258,11 +258,15 @@ void ConcaveScene::setupScene(const ConstructionInfo& ci)
btVector4 scaling(4,4,4,1);
createConcaveMesh(ci,"data/plane100.obj",shift1,scaling);
// createConcaveMesh(ci,"data/plane100.obj",shift1,scaling);
//createConcaveMesh(ci,"data/plane100.obj",shift,scaling);
b3Vector3 shift2(0,0,0);//0,230,80);//150,-100,-120);
createConcaveMesh(ci,"data/teddy.obj",shift2,scaling);
b3Vector3 shift3(130,-150,-75);//0,230,80);//150,-100,-120);
createConcaveMesh(ci,"data/leoTest1.obj",shift3,scaling);
} else
{

View File

@@ -1084,7 +1084,7 @@ void GpuSatCollision::computeConvexConvexContactsGPUSAT( const btOpenCLArray<btI
{
if (treeNodesGPU->size() && treeNodesGPU->size())
{
BT_PROFILE("m_bvhTraversalKernel");
numConcavePairs = numConcavePairsOut.at(0);