summaryrefslogtreecommitdiff
path: root/src/linearextrude.cc
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2012-05-28 21:30:19 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2012-05-28 21:30:19 (GMT)
commitaa8aee623adc74cbfe87f9e92e30be4a9ed3a7c8 (patch)
treee4cfb967d789d5c677f77be28c9caf5e973a1a6f /src/linearextrude.cc
parent352af3eab0870519cab1e5ca93dde0ff9d20e540 (diff)
fix crash bug
Diffstat (limited to 'src/linearextrude.cc')
-rw-r--r--src/linearextrude.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/linearextrude.cc b/src/linearextrude.cc
index 28ca30a..ccaa238 100644
--- a/src/linearextrude.cc
+++ b/src/linearextrude.cc
@@ -78,8 +78,10 @@ AbstractNode *LinearExtrudeModule::evaluate(const Context *ctx, const ModuleInst
// if height not given, and first argument is a number,
// then assume it should be the height.
if ( c.lookup_variable("height").type == Value::UNDEFINED )
- if ( inst->argnames[0] == "" )
- height = inst->argvalues[0];
+ if ( inst->argnames.size()>0 )
+ if ( inst->argnames[0] == "" )
+ if ( inst->argvalues[0].type == Value::NUMBER )
+ height = Value(inst->argvalues[0]);
node->layername = layer.text;
node->height = height.num;
contact: Jan Huwald // Impressum