From 1ad1c8afbf5bab7976bca860364c0553a87659c2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 31 Mar 2020 10:51:30 +0200 Subject: Catch NULL event in make_dataspaces --- libcrystfel/src/hdf5-file.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 39c64720..502ce183 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -2050,6 +2050,11 @@ static int make_dataspaces(hid_t dh, struct event *ev, hid_t *memspace, int ndims; int i; + if ( ev == NULL ) { + ERROR("Can't make dataspaces: no event ID\n"); + return 1; + } + /* Check that there are at least as many dim entries as dimensions */ sh = H5Dget_space(dh); ndims = H5Sget_simple_extent_ndims(sh); -- cgit v1.2.3