closes https://github.com/assimp/assimp/issues/2206: make bone error in verification more verbose.

pull/2211/head
Kim Kulling 2018-11-08 22:12:05 +01:00
parent 2d74514eab
commit 850d57b39d
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);
std::string name;
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 );
}
}
}