aboutsummaryrefslogtreecommitdiff
path: root/src/hdf5-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r--src/hdf5-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c
index 83850afe..0ca4f4d8 100644
--- a/src/hdf5-file.c
+++ b/src/hdf5-file.c
@@ -412,7 +412,7 @@ int hdf5_read(struct hdfile *f, struct image *image, int satcorr)
}
image->data = buf;
- if ( image->det->mask != NULL ) {
+ if ( (image->det != NULL) && (image->det->mask != NULL) ) {
mask_dh = H5Dopen2(f->fh, image->det->mask, H5P_DEFAULT);
if ( mask_dh <= 0 ) {