diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2019-05-28 14:21:28 +0200 |
---|---|---|
committer | Jan Niklas Hasse <jhasse@bixense.com> | 2019-05-28 14:22:15 +0200 |
commit | 28a7d1491367de7b39c854d166114f76d272f04f (patch) | |
tree | 0867b76c500d81e77cb4e3ebf6dd048c2992f76f | |
parent | 20b30dac6698d119e7797b34d6ed2c4ed8f48417 (diff) | |
download | ninja-28a7d1491367de7b39c854d166114f76d272f04f.tar.gz |
Fix UB "member call on null pointer of type 'DepsLog'", see #1248
-rw-r--r-- | src/graph.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc index add7868..a90c049 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -584,7 +584,7 @@ bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path, bool ImplicitDepLoader::LoadDepsFromLog(Edge* edge, string* err) { // NOTE: deps are only supported for single-target edges. Node* output = edge->outputs_[0]; - DepsLog::Deps* deps = deps_log_->GetDeps(output); + DepsLog::Deps* deps = deps_log_ ? deps_log_->GetDeps(output) : NULL; if (!deps) { EXPLAIN("deps for '%s' are missing", output->path().c_str()); return false; |