From 08d7e892a714dec8471cd45add2b1da24f66b3e7 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sun, 27 Aug 2006 20:13:44 -0400 Subject: [PATCH] Don't crash fast-import if no branch log was requested. Signed-off-by: Shawn O. Pearce --- fast-import.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index 778b8bfdd..5376b5e15 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"); -- 2.26.2