diff options
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/index.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index a9b504fe..e4e3fc6a 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -517,6 +517,7 @@ static int try_indexer(struct image *image, IndexingMethod indm, { int i, r; int n_bad = 0; + int n_before = image->n_crystals; switch ( indm & INDEXING_METHOD_MASK ) { @@ -557,6 +558,9 @@ 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); + /* For all the crystals found this time ... */ for ( i=0; i<r; i++ ) { |