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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index af4385cd..36d7b84b 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -539,10 +539,10 @@ static int check_cell(IndexingFlags flags, Crystal *cr, UnitCell *target,
/* Check at all? */
if ( !(flags & INDEXING_CHECK_CELL) ) return 0;
- if ( compare_reindexed_cell_parameters(crystal_get_cell(cr), target,
- tolerance, &rm) )
- {
- out = cell_transform_rational(crystal_get_cell(cr), rm);
+ out = compare_reindexed_cell_parameters(crystal_get_cell(cr), target,
+ tolerance, &rm);
+
+ if ( out != NULL ) {
cell_free(crystal_get_cell(cr));
crystal_set_cell(cr, out);
rtnl_mtx_free(rm);