aboutsummaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/index.c b/src/index.c
index ced8bbb8..d5e76c50 100644
--- a/src/index.c
+++ b/src/index.c
@@ -205,17 +205,15 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
if ( new_cell == NULL ) continue;
/* Sanity check */
- image->reflections = find_intersections(image,
- new_cell);
- if ( !config_insane &&
- !peak_sanity_check(image->reflections,
- image->features) )
- {
+ image->reflections = find_intersections(image, new_cell);
+ image->indexed_cell = new_cell;
+
+ if ( !config_insane && !peak_sanity_check(image) ) {
cell_free(new_cell);
+ image->indexed_cell = NULL;
continue;
}
- image->indexed_cell = new_cell;
goto done; /* Success */
}