aboutsummaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-03 12:25:19 +0100
committerThomas White <taw@physics.org>2010-02-03 12:25:19 +0100
commit2050e855c7dd5f9df6bb955b4dd00c92ede1721a (patch)
tree7c0d56160b10fc2d648d3e92d83e74330bc7dd92 /src/index.c
parent1ac7acb915aef706b32cd2df133eee07cf9161bf (diff)
Count a hit only when the pattern can be indexed
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c6
1 files changed, 2 insertions, 4 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;
}