aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/im-sandbox.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 8525227d..2a15a217 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -1228,7 +1228,9 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
} while ( !allDone );
- fclose(fh);
+ if ( fh != NULL ) {
+ fclose(fh);
+ }
/* Indicate to the workers that we are finished, and wake them up one
* last time */