From 52e96bd421e027052a3dd0f40124f0547c9bea47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 23 Apr 2024 09:07:53 +0200 Subject: [PATCH] fix crash in worker when opening the store --- src/nix-eval-jobs.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index f7ce554..855fa98 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -66,8 +66,11 @@ struct Proc { std::make_shared(std::move(toPipe.readSide))}]() { debug("created worker process %d", getpid()); try { - auto state = std::make_shared( - myArgs.searchPath, openStore(*myArgs.evalStoreUrl)); + auto evalStore = myArgs.evalStoreUrl + ? openStore(*myArgs.evalStoreUrl) + : openStore(); + auto state = std::make_shared(myArgs.searchPath, + evalStore); Bindings &autoArgs = *myArgs.getAutoArgs(*state); proc(ref(state), autoArgs, *to, *from, myArgs); } catch (Error &e) {