From 30476dd519f311431f45a7db7cf5a8717811b69b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 11 Jan 2019 11:50:34 +0100 Subject: Clean up MessagePack stuff --- libcrystfel/src/image.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 63fd54f9..7dfb9c97 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -994,6 +994,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; -- cgit v1.2.3