aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-07-09 15:57:02 +0200
committerThomas White <taw@physics.org>2015-07-09 15:57:31 +0200
commit235e8eb20240af5266b064ee931bc6723004bf4d (patch)
tree5487935a1ef56926c63baa5bb98c63d8c9718d01 /libcrystfel/src
parentd80615db26ff88e3c925e58eeaa122dc7b818dd6 (diff)
Tidy up error handling when given dodgy data locations
Diffstat (limited to 'libcrystfel/src')
-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);