Skip to content

Commit

Permalink
options: nlopt_set_xtol_abs check xtol_abs
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Jul 4, 2022
1 parent 17826b8 commit 8fa156e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ GETSET(stopval, double, stopval)
GETSET(ftol_rel, double, ftol_rel) GETSET(ftol_abs, double, ftol_abs) GETSET(xtol_rel, double, xtol_rel)
nlopt_result NLOPT_STDCALL nlopt_set_xtol_abs(nlopt_opt opt, const double *xtol_abs)
{
if (opt) {
if (opt && xtol_abs) {
nlopt_unset_errmsg(opt);
if (!opt->xtol_abs && opt->n > 0) {
opt->xtol_abs = (double *) calloc(opt->n, sizeof(double));
Expand Down

0 comments on commit 8fa156e

Please sign in to comment.