fix collada crash on invalid (blender internal expored...) file, fixes #6222

(cherry picked from commit de219e5cbe)
This commit is contained in:
Juan Linietsky 2017-08-08 08:14:51 -03:00 committed by Rémi Verschelde
parent 670d07ca0d
commit b94c5a31cd

View File

@ -2207,6 +2207,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
ERR_CONTINUE(!state.scene_map.has(nodeid)); //weird, it should have it... ERR_CONTINUE(!state.scene_map.has(nodeid)); //weird, it should have it...
NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]); NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]);
ERR_CONTINUE(!nj); //broken collada
if (!nj->owner) { if (!nj->owner) {
print_line("no owner for: " + String(nodeid)); print_line("no owner for: " + String(nodeid));
} }