From 28a7d1491367de7b39c854d166114f76d272f04f Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Tue, 28 May 2019 14:21:28 +0200 Subject: Fix UB "member call on null pointer of type 'DepsLog'", see #1248 --- src/graph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12