diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-01-20 19:56:06 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:44 +0100 |
commit | a32da73ccf7be0697d9a56b71f548a6c386d30b1 (patch) | |
tree | 5ac0272c2f27857d50d88b9a4fca2a61e9bafef6 | |
parent | 63048ec45119eb6c5718624ddf6dfa290747d4bf (diff) |
Check to see if there are any reflections
-rw-r--r-- | libcrystfel/src/peaks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index f837bcdb..a9c7145b 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -562,10 +562,11 @@ static struct integr_ind *sort_reflections(RefList *list, UnitCell *cell, *n = num_reflections(list); + if ( *n == 0 ) return NULL; + il = calloc(*n, sizeof(struct integr_ind)); if ( il == NULL ) return NULL; - for ( refl = first_refl(list, &iter); refl != NULL; refl = next_refl(refl, iter) ) |