Fixed a bug in the SortByPType-step causing some models with bones to crash

Fixed a bug in PretransformVertices - vertex colors caused an infinite loop sometimes.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@241 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2008-11-16 14:39:54 +00:00
parent dce1a8e7ce
commit 68ef00ef09
4 changed files with 15 additions and 7 deletions

View File

@@ -274,11 +274,14 @@ struct aiAnimation
~aiAnimation()
{
if (mNumChannels)
// DO NOT REMOVE THIS ADDITIONAL CHECK
if (mNumChannels && mChannels)
{
for( unsigned int a = 0; a < mNumChannels; a++)
delete mChannels[a];
delete [] mChannels;
}
}
#endif // __cplusplus
};

View File

@@ -452,9 +452,14 @@ struct aiMesh
delete [] mTextureCoords[a];
for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
delete [] mColors[a];
for( unsigned int a = 0; a < mNumBones; a++)
delete mBones[a];
delete [] mBones;
// DO NOT REMOVE THIS ADDITIONAL CHECK
if (mNumBones && mBones)
{
for( unsigned int a = 0; a < mNumBones; a++)
delete mBones[a];
delete [] mBones;
}
delete [] mFaces;
}