Replace crash in assimp with assertion

This commit is contained in:
rdb 2016-01-02 01:00:03 +01:00
parent e2c5214f39
commit ad238ad995

View File

@ -560,7 +560,10 @@ load_mesh(size_t index) {
if (character) {
for (size_t i = 0; i < mesh.mNumBones; ++i) {
const aiBone &bone = *mesh.mBones[i];
CPT(JointVertexTransform) jvt = new JointVertexTransform(character->find_joint(bone.mName.C_Str()));
CharacterJoint *joint = character->find_joint(bone.mName.C_Str());
nassertd(joint != NULL) continue;
CPT(JointVertexTransform) jvt = new JointVertexTransform(joint);
for (size_t j = 0; j < bone.mNumWeights; ++j) {
const aiVertexWeight &weight = bone.mWeights[j];