Don't crash fast-import if no branch log was requested.
authorShawn O. Pearce <spearce@spearce.org>
Mon, 28 Aug 2006 00:13:44 +0000 (20:13 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 14 Jan 2007 07:15:09 +0000 (02:15 -0500)
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c
index 778b8bfdd4aab6697b9955d1ee7ae928c1905956..5376b5e15c021ddd67223f542d2877b4664b15a5 100644 (file)
@@ -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");