aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-08 17:12:36 +0100
committerThomas White <taw@physics.org>2019-03-14 11:36:56 +0100
commit002d6cfab105095ddc6b1cdfde9eb939c12ca0f8 (patch)
tree1e36c2c8d58479d1485d409d50d5d4ba3330cc66 /src/process_image.c
parentf1221a2fa59e44c401f1f33f7f093054a2ae70c2 (diff)
Don't always dereference filename_p_e
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/process_image.c b/src/process_image.c
index b3b3b1da..7667a05c 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -120,8 +120,6 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
image.features = NULL;
image.copyme = iargs->copyme;
image.id = cookie;
- image.filename = pargs->filename_p_e->filename;
- image.event = pargs->filename_p_e->ev;
image.beam = iargs->beam;
image.det = copy_geom(iargs->det);
image.crystals = NULL;
@@ -129,6 +127,13 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
image.serial = serial;
image.indexed_by = INDEXING_NONE;
+ if ( pargs->filename_p_e != NULL ) {
+ image.filename = pargs->filename_p_e->filename;
+ image.event = pargs->filename_p_e->ev;
+ } else if ( pargs->msgpack_obj != NULL ) {
+ STATUS("Msgpack!\n");
+ }
+
time_accounts_set(taccs, TACC_WAITFILE);
set_last_task(last_task, "wait for file");