From: stevenj Date: Thu, 15 Jul 2010 16:15:40 +0000 (-0400) Subject: fix failure in C++ (and some other front-ends) when de-allocating an nlopt object... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6cbf1e1712018bacabc84e81ef251c2a913617e3;p=nlopt.git fix failure in C++ (and some other front-ends) when de-allocating an nlopt object with a local optimizer; thanks to Jurgen Werner for the bug report darcs-hash:20100715161540-c8de0-8aa02bad85ddebaae8e38e05825c23c3d850a702.gz --- diff --git a/api/options.c b/api/options.c index 60d3d71..d934f71 100644 --- a/api/options.c +++ b/api/options.c @@ -576,6 +576,7 @@ NLOPT_STDCALL nlopt_set_local_optimizer(nlopt_opt opt, nlopt_remove_inequality_constraints(opt->local_opt); nlopt_remove_equality_constraints(opt->local_opt); nlopt_set_min_objective(opt->local_opt, NULL, NULL); + nlopt_set_munge(opt->local_opt, NULL, NULL); opt->local_opt->force_stop = 0; } return NLOPT_SUCCESS;