aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.c6
-rw-r--r--src/indexamajig.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/index.c b/src/index.c
index 6d896820..2e0fd027 100644
--- a/src/index.c
+++ b/src/index.c
@@ -134,8 +134,6 @@ void index_pattern(struct image *image, IndexingMethod indm)
new_cell = match_cell(image->indexed_cell,
image->molecule->cell);
- if ( new_cell != NULL ) {
- free(image->indexed_cell);
- image->indexed_cell = new_cell;
- }
+ free(image->indexed_cell);
+ image->indexed_cell = new_cell;
}
diff --git a/src/indexamajig.c b/src/indexamajig.c
index d59132c5..c7108fee 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -180,8 +180,6 @@ int main(int argc, char *argv[])
if ( image_feature_count(image.features) > 5 ) {
- n_hits++;
-
if ( config_dumpfound ) dump_peaks(&image);
/* Not indexing nor writing xfel.drx?
@@ -198,6 +196,8 @@ int main(int argc, char *argv[])
/* No cell at this point? Then we're done. */
if ( image.indexed_cell == NULL ) goto done;
+ n_hits++;
+
/* Simulation or intensity measurements both require
* Ewald sphere vectors */
if ( config_nearbragg || config_simulate ) {