diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-12 16:59:12 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-12 17:26:51 +0200 |
commit | d10a46220c536a7a44972154d4fb4a83e18cbdd4 (patch) | |
tree | 3971e18fd048faafe3d9c89dc13b0940e7492515 /src | |
parent | 215b348553ed1b286a143b21e0c1582c71e8230c (diff) | |
download | justbuild-d10a46220c536a7a44972154d4fb4a83e18cbdd4.tar.gz |
profile: gracefully handle empty response
... by ignoring it rather than trying to dereference a nullptr.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/profile/profile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildtool/profile/profile.cpp b/src/buildtool/profile/profile.cpp index 1407ddbd..7151ec13 100644 --- a/src/buildtool/profile/profile.cpp +++ b/src/buildtool/profile/profile.cpp @@ -103,6 +103,9 @@ void Profile::SetCLI(CommandLineArguments const& cli) { void Profile::NoteActionCompleted(std::string const& id, IExecutionResponse::Ptr const& response, std::string const& cwd) { + if (not response) { + return; + } std::unique_lock lock{mutex_}; auto artifacts = response->Artifacts(); std::optional<std::string> out = std::nullopt; |