From 26d0823dccd4767dd287505f5d6a2ce71581a5f2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 16 Jan 2012 16:52:24 +0100 Subject: Avoid using uninitialised peak parameters (if integration failed) --- libcrystfel/src/peaks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 025cde12..1ce02a52 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -610,7 +610,7 @@ void integrate_reflections(struct image *image, int polar, int use_closer, bgsub); /* I/sigma(I) cutoff */ - if ( intensity/sigma < min_snr ) r = 1; + if ( !r && (intensity/sigma < min_snr) ) r = 1; /* Record intensity and set redundancy to 1 on success */ if ( r == 0 ) { -- cgit v1.2.3