diff options
author | Thomas White <taw@physics.org> | 2013-01-04 11:40:50 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-01-04 11:40:57 +0100 |
commit | 5dbd30a66af7e945da9b0c0ead6e034ba6c96d00 (patch) | |
tree | 2a0826fe9f5fa54c44af26849a264455cb6cfa8c | |
parent | b22b9de18152c917d4e9f733c41402d9935ae93d (diff) |
integrate_peak(): check that 'saturated' isn't NULL before using
Fixes a segfault
-rw-r--r-- | libcrystfel/src/peaks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 2258ec03..dabc3b1a 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -236,7 +236,7 @@ static int integrate_peak(struct image *image, int cfs, int css, if ( p == NULL ) return 1; if ( p->no_index ) return 1; - *saturated = 0; + if ( saturated != NULL ) *saturated = 0; /* Determine regions where there is expected to be a peak */ p_cfs = cfs - p->min_fs; |