summaryrefslogtreecommitdiff
path: root/module.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-27 07:31:40 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-27 07:31:40 (GMT)
commite8218ae0c73e6963362181df6c5736a4eef0900c (patch)
treecc64c028bc516690d4331cd31b438abdd1d2062b /module.cc
parent75e51ea1b2f6de1b3c0520dc5ce23b0f40aca970 (diff)
Clifford Wolf:
Many cleanups git-svn-id: http://svn.clifford.at/openscad/trunk@32 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'module.cc')
-rw-r--r--module.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/module.cc b/module.cc
index 6d7101c..489e3a4 100644
--- a/module.cc
+++ b/module.cc
@@ -86,7 +86,9 @@ AbstractNode *ModuleInstanciation::evaluate(const Context *ctx) const
}
QVector<AbstractNode*> child_nodes;
foreach (ModuleInstanciation *v, children) {
- child_nodes.append(v->evaluate(ctx));
+ AbstractNode *n = v->evaluate(ctx);
+ if (n != NULL)
+ child_nodes.append(n);
}
return ctx->evaluate_module(modname, argnames, argvalues, child_nodes);
}
@@ -117,7 +119,9 @@ AbstractNode *Module::evaluate(const Context *ctx, const QVector<QString> &call_
AbstractNode *node = new AbstractNode();
for (int i = 0; i < children.size(); i++) {
- node->children.append(children[i]->evaluate(&c));
+ AbstractNode *n = children[i]->evaluate(&c);
+ if (n != NULL)
+ node->children.append(n);
}
foreach (AbstractNode *v, child_nodes)
contact: Jan Huwald // Impressum