Skip to content

Commit

Permalink
optimize.c: handle xtol_abs == NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
aitap committed Apr 27, 2019
1 parent 3b216f5 commit ceed328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ static nlopt_result nlopt_optimize_(nlopt_opt opt, double *x, double *minf)
}
if (opt->dx)
nlopt_set_initial_step(local_opt, opt->dx);
for (i = 0; i < n && stop.xtol_abs[i] > 0; ++i);
for (i = 0; i < n && stop.xtol_abs && stop.xtol_abs[i] > 0; ++i);
if (local_opt->ftol_rel <= 0 && local_opt->ftol_abs <= 0 && local_opt->xtol_rel <= 0 && i < n) {
/* it is not sensible to call MLSL without *some*
nonzero tolerance for the local search */
Expand Down

0 comments on commit ceed328

Please sign in to comment.