diff --git a/code/DropFaceNormalsProcess.cpp b/code/DropFaceNormalsProcess.cpp index 3800fee0b..57e8b972b 100644 --- a/code/DropFaceNormalsProcess.cpp +++ b/code/DropFaceNormalsProcess.cpp @@ -104,5 +104,6 @@ bool DropFaceNormalsProcess::DropMeshFaceNormals (aiMesh* pMesh) { } delete[] pMesh->mNormals; + pMesh->mNormals = nullptr; return true; } diff --git a/code/PostStepRegistry.cpp b/code/PostStepRegistry.cpp index a04092d3a..646aeaeb0 100644 --- a/code/PostStepRegistry.cpp +++ b/code/PostStepRegistry.cpp @@ -203,6 +203,9 @@ void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out) #if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS) out.push_back( new SplitLargeMeshesProcess_Triangle()); #endif +#if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS) + out.push_back( new DropFaceNormalsProcess()); +#endif #if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS) out.push_back( new GenFaceNormalsProcess()); #endif diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h index 94ee1e474..4c9fbb857 100644 --- a/include/assimp/Compiler/pushpack1.h +++ b/include/assimp/Compiler/pushpack1.h @@ -25,7 +25,7 @@ #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) # pragma pack(push,1) # define PACK_STRUCT -#elif defined( __GNUC__ ) +#elif defined( __GNUC__ ) || defined(__clang__) # if !defined(HOST_MINGW) # define PACK_STRUCT __attribute__((__packed__)) # else