From c1b4861ace94179055e8ea746e631a15bc6b4364 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 3 Apr 2019 15:57:02 +0200 Subject: hdfsee: Fix crash with no geometry file --- libcrystfel/src/detector.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 75d5bdb9..8c2f3828 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1740,6 +1740,8 @@ struct detector *copy_geom(const struct detector *in) struct detector *out; int i; + if ( in == NULL ) return NULL; + out = malloc(sizeof(struct detector)); memcpy(out, in, sizeof(struct detector)); -- cgit v1.2.3