diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-05-09 04:20:06 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-05-09 04:20:06 (GMT) |
commit | f8ad66c8bbb3c78548c2e4b3b930f82d4a57b345 (patch) | |
tree | 2c240af2a84e51d52a20fe5d673a6294720c3490 /src | |
parent | e09d1df0e1d304eedba36494535848e64631b22d (diff) |
fix issue 352 - require 'file' to be a string
Diffstat (limited to 'src')
-rw-r--r-- | src/linearextrude.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linearextrude.cc b/src/linearextrude.cc index c64a235..4953781 100644 --- a/src/linearextrude.cc +++ b/src/linearextrude.cc @@ -72,7 +72,7 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI Value twist = c.lookup_variable("twist", true); Value slices = c.lookup_variable("slices", true); - if (!file.isUndefined()) { + if (!file.isUndefined() && file.type() == Value::STRING) { PRINT("DEPRECATED: Support for reading files in linear_extrude will be removed in future releases. Use a child import() instead."); node->filename = inst->getAbsolutePath(file.toString()); } @@ -80,7 +80,7 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI // if height not given, and first argument is a number, // then assume it should be the height. if (c.lookup_variable("height").isUndefined() && - evalctx->numArgs() > 0 && + evalctx->numArgs() > 0 && evalctx->getArgName(0) == "" && evalctx->getArgValue(0).type() == Value::NUMBER) { height = evalctx->getArgValue(0); |