fix crash bug

felipesanches-svg
Don Bright 2012-05-28 16:30:19 -05:00
parent 352af3eab0
commit aa8aee623a
1 changed files with 4 additions and 2 deletions

View File

@ -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;