diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2019-05-28 12:21:28 (GMT) |
---|---|---|
committer | Jan Niklas Hasse <jhasse@bixense.com> | 2019-05-28 12:22:15 (GMT) |
commit | 28a7d1491367de7b39c854d166114f76d272f04f (patch) | |
tree | 0867b76c500d81e77cb4e3ebf6dd048c2992f76f /src/graph.cc | |
parent | 20b30dac6698d119e7797b34d6ed2c4ed8f48417 (diff) | |
download | Ninja-28a7d1491367de7b39c854d166114f76d272f04f.zip Ninja-28a7d1491367de7b39c854d166114f76d272f04f.tar.gz Ninja-28a7d1491367de7b39c854d166114f76d272f04f.tar.bz2 |
Fix UB "member call on null pointer of type 'DepsLog'", see #1248
Diffstat (limited to 'src/graph.cc')
-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; |