From 7d3593fcbce70a7d7783f0e9d1c9955ecb75dc11 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 10 Aug 2020 17:18:30 +0200 Subject: image_read: Tolerate event==NULL --- libcrystfel/src/image.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libcrystfel') 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 ) { -- cgit v1.2.3