[Bf-blender-cvs] [0525db3] master: fix T44648: Collada finding bone chains during import crashes when no bones are there
Gaia Clary
noreply at git.blender.org
Sun May 10 11:05:09 CEST 2015
Commit: 0525db39d13fbcbf078b8297fbe54387da49a371
Author: Gaia Clary
Date: Sun May 10 11:04:09 2015 +0200
Branches: master
https://developer.blender.org/rB0525db39d13fbcbf078b8297fbe54387da49a371
fix T44648: Collada finding bone chains during import crashes when no bones are there
===================================================================
M source/blender/collada/ArmatureImporter.cpp
===================================================================
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index c2ee617..bccaf4e 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);
More information about the Bf-blender-cvs
mailing list