From 3b216f5fdbfb3c7da85dc7bd2278b9038b105284 Mon Sep 17 00:00:00 2001 From: Ivan Krylov Date: Fri, 26 Apr 2019 18:45:00 +0300 Subject: [PATCH] praxis: handle xtol_abs == NULL --- src/algs/praxis/praxis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/algs/praxis/praxis.c b/src/algs/praxis/praxis.c index e6ce82e3..9d664419 100644 --- a/src/algs/praxis/praxis.c +++ b/src/algs/praxis/praxis.c @@ -189,7 +189,8 @@ nlopt_result praxis_(double t0, double machep, double h0, t_old = small + t0; else { t_old = 0; - for (i__ = 0; i__ < n; ++i__) + if (stop->xtol_abs) + for (i__ = 0; i__ < n; ++i__) if (stop->xtol_abs[i__] > t_old) t_old = stop->xtol_abs[i__]; t_old += small;