diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-12 03:35:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-12 03:35:08 +0300 |
commit | 1b8a4fd9bd29bfb34f683ee5cff5b842b1c9cf2c (patch) | |
tree | 4ff4acd5f349238243c2ce378c2e77d808d1847d /source/blender/collada | |
parent | d7ceca8c934d098832191d6ae6bd2b08dd552d89 (diff) |
Fix T46444: Crash importing DAE w/ empty armature
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 6ddce75ec33..fd08e1ebfab 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) { |