[Bf-blender-cvs] [1b8a4fd] master: Fix T46444: Crash importing DAE w/ empty armature

Campbell Barton noreply at git.blender.org
Mon Oct 12 02:41:24 CEST 2015


Commit: 1b8a4fd9bd29bfb34f683ee5cff5b842b1c9cf2c
Author: Campbell Barton
Date:   Mon Oct 12 11:35:08 2015 +1100
Branches: master
https://developer.blender.org/rB1b8a4fd9bd29bfb34f683ee5cff5b842b1c9cf2c

Fix T46444: Crash importing DAE w/ empty armature

===================================================================

M	source/blender/collada/ArmatureImporter.cpp

===================================================================

diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 6ddce75..fd08e1e 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -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) {




More information about the Bf-blender-cvs mailing list