diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2015-05-10 12:04:09 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2015-05-10 12:04:37 +0300 |
commit | 0525db39d13fbcbf078b8297fbe54387da49a371 (patch) | |
tree | 4207d8419271ab0c478db5d935b6e1a082804806 /source | |
parent | 1fb97ffeedc9aefa4351b34bdc51764817dd2140 (diff) |
fix T44648: Collada finding bone chains during import crashes when no bones are there
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index c2ee6170470..bccaf4eddf6 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -588,9 +588,11 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin) /* and step back to edit mode to fix the leaf nodes */ ED_armature_to_edit(armature); - connect_bone_chains(armature, (Bone *)armature->bonebase.first, UNLIMITED_CHAIN_MAX); - fix_leaf_bones(armature, (Bone *)armature->bonebase.first); - + if (armature->bonebase.first) { + /* Do this only if Armature has bones */ + connect_bone_chains(armature, (Bone *)armature->bonebase.first, UNLIMITED_CHAIN_MAX); + fix_leaf_bones(armature, (Bone *)armature->bonebase.first); + } // exit armature edit mode ED_armature_from_edit(armature); ED_armature_edit_free(armature); |