diff options
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index d6f25729..a7430fb2 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -1236,7 +1236,9 @@ int hdfile_get_value(struct hdfile *f, const char *name, struct event *ev, for ( i=0; i<ndims; i++ ) { if ( size[i] == 1 ) continue; - if ( ( i==0 ) && (ev != NULL) && (size[i] > ev->dim_entries[0]) ) { + if ( ( i==0 ) && (ev != NULL) && (ev->dim_length > 0) + && (size[i] > ev->dim_entries[0]) ) + { dim_flag = 1; } else { H5Tclose(type); |