diff options
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index c7069faa..44ef2774 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -1178,6 +1178,8 @@ enum imagefile_type imagefile_get_type(struct imagefile *f) struct hdfile *imagefile_get_hdfile(struct imagefile *f) { + if ( f == NULL ) return NULL; + if ( f->type != IMAGEFILE_HDF5 ) { ERROR("Not an HDF5 file!\n"); return NULL; |