Fix possible nullptr dereferencing. (#5595)
parent
ec5242a1a0
commit
30466aaf16
|
@ -524,7 +524,11 @@ void CatmullClarkSubdivider::InternSubdivide(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ai_assert(adj[o] - moffsets[nidx].first < mp->mNumFaces);
|
if (mp == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ai_assert(adj[o] - moffsets[nidx].first < mp->mNumFaces);
|
||||||
const aiFace &f = mp->mFaces[adj[o] - moffsets[nidx].first];
|
const aiFace &f = mp->mFaces[adj[o] - moffsets[nidx].first];
|
||||||
bool haveit = false;
|
bool haveit = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue