Check for null
parent
6600446e2c
commit
323d59c7aa
|
@ -105,8 +105,10 @@ void TriangulateProcess::Execute( aiScene* pScene)
|
||||||
bool bHas = false;
|
bool bHas = false;
|
||||||
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
|
for( unsigned int a = 0; a < pScene->mNumMeshes; a++)
|
||||||
{
|
{
|
||||||
if ( TriangulateMesh( pScene->mMeshes[ a ] ) ) {
|
if (pScene->mMeshes[ a ]) {
|
||||||
bHas = true;
|
if ( TriangulateMesh( pScene->mMeshes[ a ] ) ) {
|
||||||
|
bHas = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( bHas ) {
|
if ( bHas ) {
|
||||||
|
@ -286,7 +288,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
|
||||||
// We project it onto a plane to get a 2d triangle.
|
// We project it onto a plane to get a 2d triangle.
|
||||||
|
|
||||||
// Collect all vertices of of the polygon.
|
// Collect all vertices of of the polygon.
|
||||||
for (tmp = 0; tmp < max; ++tmp) {
|
for (tmp = 0; tmp < MIN(max,max_out+2); ++tmp) {
|
||||||
temp_verts3d[tmp] = verts[idx[tmp]];
|
temp_verts3d[tmp] = verts[idx[tmp]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue