summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-01-30 11:55:45 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2023-01-31 15:24:37 +0100
commitc882b0451adbe96878f67a3e31738749e93e5d4f (patch)
tree90c4e7c9d59de02baf6f9d0b0dcb3e44286bd74b /src/buildtool/execution_engine/executor
parent31cb23a32d0665777a82799f3f476266882516cb (diff)
downloadjustbuild-c882b0451adbe96878f67a3e31738749e93e5d4f.tar.gz
Fix segfault if reading git tree failed
Diffstat (limited to 'src/buildtool/execution_engine/executor')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp3
1 files changed, 2 insertions, 1 deletions
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;
}
}