Merge pull request #2211 from assimp/issue_2206

closes https://github.com/assimp/assimp/issues/2206: make bone error …
pull/2217/head
Kim Kulling 2018-11-09 15:36:02 +01:00 committed by GitHub
commit 3fbe9095d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -491,8 +491,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
{
if (pMesh->mBones[i]->mName == pMesh->mBones[a]->mName)
{
ReportError("aiMesh::mBones[%i] has the same name as "
"aiMesh::mBones[%i]",i,a);
const char *name = "unknown";
if (nullptr != pMesh->mBones[ i ]->mName.C_Str()) {
name = pMesh->mBones[ i ]->mName.C_Str();
}
ReportError("aiMesh::mBones[%i], name = \"%s\" has the same name as "
"aiMesh::mBones[%i]", i, name, a );
}
}
}