From c882b0451adbe96878f67a3e31738749e93e5d4f Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 30 Jan 2023 11:55:45 +0100 Subject: Fix segfault if reading git tree failed --- src/buildtool/execution_engine/executor/executor.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 060370fb..e5dcc5a9 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -238,7 +238,8 @@ class ExecutorImpl { if (auto it = entry_map.find(digest); it != entry_map.end()) { auto const& entry = it->second; if (entry->IsTree()) { - if (not VerifyOrUploadTree(api, *entry->Tree())) { + auto const& tree = entry->Tree(); + if (not tree or not VerifyOrUploadTree(api, *tree)) { return false; } } -- cgit v1.2.3