aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-31 10:51:30 +0200
committerThomas White <taw@physics.org>2020-03-31 10:51:30 +0200
commit1ad1c8afbf5bab7976bca860364c0553a87659c2 (patch)
tree204eefda89c737d8e76e1d58b42cec59e20b39af /libcrystfel
parente5e0e07ac9d1de83a9e30da7667db13bf5f59012 (diff)
Catch NULL event in make_dataspaces
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/hdf5-file.c5
1 files changed, 5 insertions, 0 deletions
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);