From ff7941d1ca65b70cfdb68658d7b2a7b15f01f2c0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 10 Oct 2013 15:52:13 +0200 Subject: Avoid calling fit_bg() on a bad box (because it segfaults) --- libcrystfel/src/integration.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libcrystfel/src/integration.c') diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index c366f30c..1b68cf0b 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -1565,8 +1565,10 @@ static void integrate_rings(IntegrationMethod meth, Crystal *cr, r = center_and_check_box(&ic, bx, &saturated); } else { r = check_box(&ic, bx, &saturated); - fit_bg(&ic, bx); - if ( bx->verbose ) show_peak_box(&ic, bx); + if ( !r ) { + fit_bg(&ic, bx); + if ( bx->verbose ) show_peak_box(&ic, bx); + } bx->offs_fs = 0.0; bx->offs_ss = 0.0; } -- cgit v1.2.3