From aa8aee623adc74cbfe87f9e92e30be4a9ed3a7c8 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Mon, 28 May 2012 16:30:19 -0500 Subject: [PATCH] fix crash bug --- src/linearextrude.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/linearextrude.cc b/src/linearextrude.cc index 28ca30a5..ccaa238c 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;