diff options
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 44ef2774..7c04d7f7 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -112,9 +112,12 @@ static int comp(const void *a, const void *b) */ ImageFeatureList *sort_peaks(ImageFeatureList *flist) { - ImageFeatureList *n = image_feature_list_new(); + ImageFeatureList *n; int nf, i; + if ( flist == NULL ) return NULL; + + n = image_feature_list_new(); if ( n == NULL ) return NULL; n->features = malloc(flist->n_features*sizeof(struct imagefeature)); |