summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fast-import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 778b8bfdd4..5376b5e15c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1715,7 +1715,8 @@ int main(int argc, const char **argv)
dump_branches();
dump_tags();
dump_marks();
- fclose(branch_log);
+ if (branch_log)
+ fclose(branch_log);
fprintf(stderr, "%s statistics:\n", argv[0]);
fprintf(stderr, "---------------------------------------------------\n");