aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-10 17:18:30 +0200
committerThomas White <taw@physics.org>2020-08-10 17:18:30 +0200
commit7d3593fcbce70a7d7783f0e9d1c9955ecb75dc11 (patch)
treec526bf0f4461620822df94ec6eb90f576a2136c8 /libcrystfel
parent5deab80f3d11bc3cda4e912f2b26580f3156728e (diff)
image_read: Tolerate event==NULL
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index a5973e4f..d48e4f3b 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -748,7 +748,11 @@ struct image *image_read(const DataTemplate *dtempl,
}
image->filename = strdup(filename);
- image->ev = strdup(event);
+ if ( event != NULL ) {
+ image->ev = strdup(event);
+ } else {
+ image->ev = strdup("//"); /* Null event */
+ }
/* Load the image data */
if ( !no_image_data ) {