aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/hdf5-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-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 9953b3e0..c58a3ae5 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -2370,6 +2370,11 @@ struct event_list *fill_event_list(struct hdfile *hdfile, struct detector *det)
dh = H5Dopen2(hdfile->fh, full_panel_path,
H5P_DEFAULT);
+ if ( dh < 0 ) {
+ ERROR("Failed to enumerate events. "
+ "Check your geometry file.\n");
+ return NULL;
+ }
sh = H5Dget_space(dh);
dims = H5Sget_simple_extent_ndims(sh);