Fix invalid access

pull/5765/head
dataisland 2024-09-08 11:03:14 -05:00
parent 4024726eca
commit 80903754bd
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,10 @@ void SortByPTypeProcess::Execute(aiScene *pScene) {
// with the largest number of primitives
unsigned int aiNumPerPType[4] = { 0, 0, 0, 0 };
aiFace *pFirstFace = mesh->mFaces;
if (!pFirstFace) {
continue;
}
aiFace *const pLastFace = pFirstFace + mesh->mNumFaces;
unsigned int numPolyVerts = 0;