mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Check if drv is initialized in DerivationGoal::waiteeDone
It might not be set, in which case we shouldn't do anything. Surprisingly, this somehow did not cause segfaults before? Caught by UBSan.
This commit is contained in:
parent
5b6a21acc5
commit
a1f3f103bc
@ -1569,7 +1569,7 @@ void DerivationGoal::waiteeDone(GoalPtr waitee, ExitCode result)
|
||||
{
|
||||
Goal::waiteeDone(waitee, result);
|
||||
|
||||
if (!useDerivation) return;
|
||||
if (!useDerivation || !drv) return;
|
||||
auto & fullDrv = *dynamic_cast<Derivation *>(drv.get());
|
||||
|
||||
auto * dg = dynamic_cast<DerivationGoal *>(&*waitee);
|
||||
|
Loading…
Reference in New Issue
Block a user