Fix review findings

pull/3958/head
Kim Kulling 2021-06-16 11:21:31 +02:00 committed by GitHub
parent af748755e1
commit a34b9d1c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2021, assimp team Copyright (c) 2006-2021, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
@ -50,11 +49,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp; using namespace Assimp;
EmbedTexturesProcess::EmbedTexturesProcess() EmbedTexturesProcess::EmbedTexturesProcess() :
: BaseProcess() { BaseProcess() {
// empty
} }
EmbedTexturesProcess::~EmbedTexturesProcess() { EmbedTexturesProcess::~EmbedTexturesProcess() {
// empty
} }
bool EmbedTexturesProcess::IsActive(unsigned int pFlags) const { bool EmbedTexturesProcess::IsActive(unsigned int pFlags) const {
@ -68,12 +69,12 @@ void EmbedTexturesProcess::SetupProperties(const Importer* pImp) {
} }
void EmbedTexturesProcess::Execute(aiScene* pScene) { void EmbedTexturesProcess::Execute(aiScene* pScene) {
if (pScene == nullptr || pScene->mRootNode == nullptr) return; if (pScene == nullptr || pScene->mRootNode == nullptr || mIOHandler == nullptr){
return;
}
aiString path; aiString path;
uint32_t embeddedTexturesCount = 0u; uint32_t embeddedTexturesCount = 0u;
for (auto matId = 0u; matId < pScene->mNumMaterials; ++matId) { for (auto matId = 0u; matId < pScene->mNumMaterials; ++matId) {
auto material = pScene->mMaterials[matId]; auto material = pScene->mMaterials[matId];