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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index d75f28ed..1476304d 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -606,7 +606,11 @@ static int try_indexer(struct image *image, IndexingMethod indm,
}
/* Stop a really difficult to debug situation in its tracks */
- assert(image->n_crystals - n_before == r);
+ if ( image->n_crystals - n_before != r ) {
+ ERROR("Whoops, indexer didn't return the right number "
+ "of crystals!\n");
+ exit(1);
+ }
/* For all the crystals found this time ... */
for ( i=0; i<r; i++ ) {