aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-02-20 12:01:23 +0100
committerThomas White <taw@physics.org>2015-02-20 12:01:23 +0100
commitdd42c1d7da82cd8fa18b3df0e589ef83064e30f5 (patch)
tree80bfbf81779a24f8ea6aa75e24a787a25296d5af
parentcee2878bbe1fbec45fcf69193ddc40befd0a5e75 (diff)
indexamajig: Take a copy of the geometry structure
There are already things which alter this structure during processing, and probably more to come. Taking a copy avoids problems down the line and fixes a serious bug when using coffset and a fixed clen.
-rw-r--r--src/process_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process_image.c b/src/process_image.c
index bfdd1bee..e5b4168f 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -186,7 +186,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
image.filename = pargs->filename_p_e->filename;
image.event = pargs->filename_p_e->ev;
image.beam = iargs->beam;
- image.det = iargs->det;
+ image.det = copy_geom(iargs->det);
image.crystals = NULL;
image.n_crystals = 0;
image.serial = serial;
@@ -373,5 +373,6 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
free(image.data);
if ( image.flags != NULL ) free(image.flags);
image_feature_list_free(image.features);
+ free_detector_geometry(image.det);
hdfile_close(hdfile);
}