aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-11-01 11:04:46 +0100
committerThomas White <taw@physics.org>2018-11-02 14:24:55 +0100
commit02675d2a6e77c58cefec4b9fb49332824bfb8ea1 (patch)
tree5a08668e7b8912c6d953ed7ccd4859d8634f31d8 /libcrystfel/src/index.c
parented94e880540cf1cbc3903ec5ec1489e2b67ac0ca (diff)
Change a couple of important asserts to if statements
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++ ) {