Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-22 19:49:15 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-22 19:49:15 +0400
commitcd7fbf974913d1b8436f17431fa583a4f48253d1 (patch)
tree56c3935be731857a1001ca9f5ebccf9339bf09a0 /source/blender/collada/SkinInfo.cpp
parent150ce958b62db2cca0d2e0c94ff202d13da7fd18 (diff)
Fix part of #34746: crash importing certain collada files with armatures. It still
imports the armature wrong though.
Diffstat (limited to 'source/blender/collada/SkinInfo.cpp')
-rw-r--r--source/blender/collada/SkinInfo.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp
index 15320a8f221..95baab05e3a 100644
--- a/source/blender/collada/SkinInfo.cpp
+++ b/source/blender/collada/SkinInfo.cpp
@@ -316,12 +316,15 @@ void SkinInfo::find_root_joints(const std::vector<COLLADAFW::Node *> &root_joint
std::vector<JointData>::iterator ji;
//for each joint_data in this skin
for (ji = joint_data.begin(); ji != joint_data.end(); ji++) {
- //get joint node from joint map
- COLLADAFW::Node *joint = joint_by_uid[(*ji).joint_uid];
- //find if joint node is in the tree belonging to the root_joint
- if (find_node_in_tree(joint, root)) {
- if (std::find(result.begin(), result.end(), root) == result.end())
- result.push_back(root);
+ if (joint_by_uid.find((*ji).joint_uid) != joint_by_uid.end()) {
+ //get joint node from joint map
+ COLLADAFW::Node *joint = joint_by_uid[(*ji).joint_uid];
+
+ //find if joint node is in the tree belonging to the root_joint
+ if (find_node_in_tree(joint, root)) {
+ if (std::find(result.begin(), result.end(), root) == result.end())
+ result.push_back(root);
+ }
}
}
}