aboutsummaryrefslogtreecommitdiff
path: root/src/gui_merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_merge.c')
-rw-r--r--src/gui_merge.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui_merge.c b/src/gui_merge.c
index b911fa5a..ca3c3a46 100644
--- a/src/gui_merge.c
+++ b/src/gui_merge.c
@@ -364,7 +364,10 @@ static int write_partialator_script(const char *filename,
fprintf(fh, "#!/bin/sh\n");
exe_path = get_crystfel_exe("partialator");
- if ( exe_path == NULL ) return 1;
+ if ( exe_path == NULL ) {
+ fclose(fh);
+ return 1;
+ }
fprintf(fh, "%s \\\n", exe_path);
for ( i=0; i<input->n_streams; i++ ) {
@@ -468,7 +471,10 @@ static int write_process_hkl_script(const char *filename,
fprintf(fh, "#!/bin/sh\n");
exe_path = get_crystfel_exe("process_hkl");
- if ( exe_path == NULL ) return 1;
+ if ( exe_path == NULL ) {
+ fclose(fh);
+ return 1;
+ }
add_process_hkl(fh, exe_path, input, params, out_hkl,
stdout_filename, stderr_filename, "", "");