summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-04-25 18:58:02 (GMT)
committerEvan Martin <martine@danga.com>2011-04-25 18:58:02 (GMT)
commit5c192cda0788faeed93b3ba03a6830ed43762b24 (patch)
treef42a5fe0fbde25d0f083f7b8953346ea412d7c4f /src/build_log.cc
parent98bb8487f62e55aed311fc36ce371884c1344764 (diff)
downloadNinja-5c192cda0788faeed93b3ba03a6830ed43762b24.zip
Ninja-5c192cda0788faeed93b3ba03a6830ed43762b24.tar.gz
Ninja-5c192cda0788faeed93b3ba03a6830ed43762b24.tar.bz2
don't close null log files
Diffstat (limited to 'src/build_log.cc')
-rw-r--r--src/build_log.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 6943550..c2e39d2 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -76,7 +76,8 @@ void BuildLog::RecordCommand(Edge* edge, int time_ms) {
}
void BuildLog::Close() {
- fclose(log_file_);
+ if (log_file_)
+ fclose(log_file_);
log_file_ = NULL;
}