diff options
author | Thomas White <taw@physics.org> | 2013-10-10 15:52:13 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-10-10 15:52:13 +0200 |
commit | ff7941d1ca65b70cfdb68658d7b2a7b15f01f2c0 (patch) | |
tree | d992fe8c3f32131dcb492999afd1d6c1a9151b0e /libcrystfel | |
parent | 36e817b4002703148e29aa0289195113ed4848e1 (diff) |
Avoid calling fit_bg() on a bad box (because it segfaults)
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/integration.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |