From 5b6749b20e1fe14f994df0eb3a8096d69a72326a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 12 Aug 2014 13:42:36 +0200 Subject: partial_sim: Fix free(geomfile) --- libcrystfel/src/stream.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcrystfel/src/stream.c') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 808be152..e7062e25 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1043,6 +1043,8 @@ void write_geometry_file(Stream *st, const char *geom_filename) { FILE *geom_fh; char *rval; + if ( geom_filename == NULL ) return; + geom_fh = fopen(geom_filename, "r"); if ( geom_fh == NULL ) { ERROR("Failed to read detector geometry from " -- cgit v1.2.3