Skip to content

Commit

Permalink
Close file when done in CIF output.
Browse files Browse the repository at this point in the history
  • Loading branch information
mittinatten committed May 5, 2021
1 parent c204ce7 commit 48a36eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cif.cc
Expand Up @@ -744,5 +744,11 @@ int freesasa_export_tree_to_cif(const char *filename,

std::ostream out(buf);

return write_result(out, root, options);
int ret = write_result(out, root, options);

if (filename != NULL) {
fout.close();
}

return ret;
}

0 comments on commit 48a36eb

Please sign in to comment.