Fix T46444: Crash importing DAE w/ empty armature

This commit is contained in:
Campbell Barton 2015-10-12 11:35:08 +11:00
parent a5938e01e5
commit ae4b02c6bb
1 changed files with 7 additions and 3 deletions

View File

@ -255,9 +255,13 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
{
BoneExtended *dominant_child = NULL;
int maxlen = 0;
Bone *child = (Bone *)parentbone->childbase.first;
if (child && (import_settings->find_chains || child->next==NULL) )
{
Bone *child;
if (parentbone == NULL)
return;
child = (Bone *)parentbone->childbase.first;
if (child && (import_settings->find_chains || child->next==NULL)) {
for (; child; child = child->next) {
BoneExtended *be = extended_bones[child->name];
if (be != NULL) {