mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02: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
1 changed files with 1 additions and 1 deletions
|
@ -1569,7 +1569,7 @@ void DerivationGoal::waiteeDone(GoalPtr waitee, ExitCode result)
|
||||||
{
|
{
|
||||||
Goal::waiteeDone(waitee, result);
|
Goal::waiteeDone(waitee, result);
|
||||||
|
|
||||||
if (!useDerivation) return;
|
if (!useDerivation || !drv) return;
|
||||||
auto & fullDrv = *dynamic_cast<Derivation *>(drv.get());
|
auto & fullDrv = *dynamic_cast<Derivation *>(drv.get());
|
||||||
|
|
||||||
auto * dg = dynamic_cast<DerivationGoal *>(&*waitee);
|
auto * dg = dynamic_cast<DerivationGoal *>(&*waitee);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue