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:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-02-08 16:23:36 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-02-08 16:23:36 +0400
commitfdd18c7a07053f8bcb561703bd2467c28e02a2d7 (patch)
treedb58eedc947a21075a5d3eb79624fea9c5e03ec0 /source/blender/collada/DocumentImporter.cpp
parent1dfb6404b78396988fedf5ad2bd111c6af13cf12 (diff)
fixed collada import for objects which have NO children
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r--source/blender/collada/DocumentImporter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index fa181d4a6e9..da19fe11783 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -547,9 +547,11 @@ void DocumentImporter::write_node(COLLADAFW::Node *node, COLLADAFW::Node *parent
}
// if node has child nodes write them
COLLADAFW::NodePointerArray &child_nodes = node->getChildNodes();
- ob = *objects_done->begin();
- for (unsigned int i = 0; i < child_nodes.getCount(); i++) {
- write_node(child_nodes[i], node, sce, ob, is_library_node);
+ if (objects_done->size() > 0) {
+ ob = *objects_done->begin();
+ for (unsigned int i = 0; i < child_nodes.getCount(); i++) {
+ write_node(child_nodes[i], node, sce, ob, is_library_node);
+ }
}
}