diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-27 07:31:40 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-27 07:31:40 (GMT) |
commit | e8218ae0c73e6963362181df6c5736a4eef0900c (patch) | |
tree | cc64c028bc516690d4331cd31b438abdd1d2062b /module.cc | |
parent | 75e51ea1b2f6de1b3c0520dc5ce23b0f40aca970 (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.cc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |