nixos-option: fix expression position calculation
This was causing null pointer dereferences. Pattern copied from Nix source code.
This commit is contained in:
parent
ee5e438359
commit
775f683a5a
@ -119,7 +119,7 @@ Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy
|
|||||||
|
|
||||||
Value evaluateValue(Context & ctx, Value & v)
|
Value evaluateValue(Context & ctx, Value & v)
|
||||||
{
|
{
|
||||||
ctx.state.forceValue(v, v.attrs->pos);
|
ctx.state.forceValue(v, [&]() { return v.determinePos(nix::noPos); });
|
||||||
if (ctx.autoArgs.empty()) {
|
if (ctx.autoArgs.empty()) {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user