diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-01-30 11:55:45 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-01-31 15:24:37 +0100 |
commit | c882b0451adbe96878f67a3e31738749e93e5d4f (patch) | |
tree | 90c4e7c9d59de02baf6f9d0b0dcb3e44286bd74b /src | |
parent | 31cb23a32d0665777a82799f3f476266882516cb (diff) | |
download | justbuild-c882b0451adbe96878f67a3e31738749e93e5d4f.tar.gz |
Fix segfault if reading git tree failed
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 3 |
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; } } |