replace NULL and avoid ai_assert with more than 2 tests.

This commit is contained in:
Kim Kulling
2020-06-23 21:05:42 +02:00
659 changed files with 30283 additions and 48642 deletions

View File

@@ -98,12 +98,14 @@ void DropFaceNormalsProcess::Execute( aiScene* pScene) {
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
bool DropFaceNormalsProcess::DropMeshFaceNormals (aiMesh* pMesh) {
if (NULL == pMesh->mNormals) {
bool DropFaceNormalsProcess::DropMeshFaceNormals (aiMesh* mesh) {
ai_assert(nullptr != mesh);
if (nullptr == mesh->mNormals) {
return false;
}
delete[] pMesh->mNormals;
pMesh->mNormals = nullptr;
delete[] mesh->mNormals;
mesh->mNormals = nullptr;
return true;
}