bugfix: handling possible nullptr access.

update: replace clear be resize( 0 ) at some places to avoid double allocations ( only a micro optimization ).

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
This commit is contained in:
Kim Kulling
2014-07-04 00:22:13 +02:00
parent b3b732c12b
commit c6b516b68b
4 changed files with 79 additions and 37 deletions

View File

@@ -271,7 +271,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
const aiVector3D& origNorm = pMesh->mNormals[a];
const aiVector3D& origTang = pMesh->mTangents[a];
const aiVector3D& origBitang = pMesh->mBitangents[a];
closeVertices.clear();
closeVertices.resize( 0 );
// find all vertices close to that position
vertexFinder->FindPositions( origPos, posEpsilon, verticesFound);