aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index e3512b4a..f519c3b9 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -949,6 +949,10 @@ void index_pattern_4(struct image *image, IndexingPrivate *ipriv, int *ping,
image->crystals = NULL;
image->n_crystals = 0;
+ /* No peaks? */
+ if ( image->features == NULL ) return;
+ if ( image_feature_count(image->features) == 0 ) return;
+
if ( !isnan(ipriv->wavelength_estimate) ) {
if ( !within_tolerance(image->lambda,
ipriv->wavelength_estimate,