From af6049b9a7f51835d8ad2b1cbb4576f2cb6f0adc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 23 Feb 2017 17:20:45 +0100 Subject: Don't allow profile radius to go negative --- src/post-refinement.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/post-refinement.c b/src/post-refinement.c index c57073c4..ef8ae844 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -307,6 +307,11 @@ static double residual_f(const gsl_vector *v, void *pp) crystal_set_image(cr, &im); apply_parameters(v, pv->initial, pv->rv, cr); + if ( crystal_get_profile_radius(cr) < 0.0 ) { + crystal_free(cr); + return INFINITY; + } + list = copy_reflist(crystal_get_reflections(cr)); crystal_set_reflections(cr, list); -- cgit v1.2.3