mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 22:42:37 +00:00
calib: defensive guards in find_optimal_PA_speed (fix CLI pa-tower SIGSEGV) (#14414)
This commit is contained in:
@@ -776,7 +776,9 @@ double ConfigBase::get_abs_value(const t_config_option_key &opt_key, double rati
|
||||
{
|
||||
// Get stored option value.
|
||||
const ConfigOption *raw_opt = this->option(opt_key);
|
||||
assert(raw_opt != nullptr);
|
||||
// Mirror the single-arg overload — assert() is a no-op under NDEBUG.
|
||||
if (raw_opt == nullptr)
|
||||
throw ConfigurationError("ConfigBase::get_abs_value(): \"" + opt_key + "\" is not defined");
|
||||
if (raw_opt->type() != coFloatOrPercent)
|
||||
throw ConfigurationError("ConfigBase::get_abs_value(): opt_key is not of coFloatOrPercent");
|
||||
// Compute absolute value.
|
||||
|
||||
Reference in New Issue
Block a user