fix macro [bad_name]

supermerill/SuperSlicer#1728
This commit is contained in:
supermerill 2021-10-28 12:30:31 +02:00
parent f5996fe42f
commit 137726a237

View File

@ -798,6 +798,8 @@ namespace client
opt_key_str.resize(opt_key_str.size() - 1);
opt = ctx->resolve_symbol(opt_key_str);
}
if (opt == nullptr)
ctx->throw_exception("Variable does not exist", opt_key);
if (! opt->is_vector())
ctx->throw_exception("Trying to index a scalar variable", opt_key);
const ConfigOptionVectorBase *vec = static_cast<const ConfigOptionVectorBase*>(opt);