From 0d3490c00c6224f332a8128ff22c87dc9642fb6e Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Tue, 13 Apr 2010 21:06:03 +0000 Subject: [PATCH] Fix: scene validation forgets to validate aiScene::mTextures. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@678 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ValidateDataStructure.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/ValidateDataStructure.cpp b/code/ValidateDataStructure.cpp index 7541368ee..93d122b5d 100644 --- a/code/ValidateDataStructure.cpp +++ b/code/ValidateDataStructure.cpp @@ -246,6 +246,15 @@ void ValidateDSProcess::Execute( aiScene* pScene) else if (pScene->mLights) { ReportError("aiScene::mLights is non-null although there are no lights"); } + + // validate all textures + if (pScene->mNumTextures) { + DoValidation(pScene->mTextures,pScene->mNumTextures, + "mTextures","mNumTextures"); + } + else if (pScene->mTextures) { + ReportError("aiScene::mTextures is non-null although there are no textures"); + } // validate all materials if (pScene->mNumMaterials) { @@ -767,7 +776,7 @@ void ValidateDSProcess::Validate( const aiTexture* pTexture) (sz[1] >= 'A' && sz[1] <= 'Z') || (sz[2] >= 'A' && sz[2] <= 'Z') || (sz[3] >= 'A' && sz[3] <= 'Z')) { - ReportError("aiTexture::achFormatHint contains non-lowercase characters"); + ReportError("aiTexture::achFormatHint contains non-lowercase letters"); } }