aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval-cache.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@users.noreply.github.com>2022-05-05 13:54:20 -0600
committerGitHub <noreply@github.com>2022-05-05 13:54:20 -0600
commit0ac121a0940822e935dd067eaa43826cc3beb041 (patch)
tree9422f7bdd6a4718a3cab234c2c8a84d7c91386fe /src/libexpr/eval-cache.cc
parent58645a78ab7c1654c513a1121511ee01551630bc (diff)
parentf4102de84ba4dd3b845a3e34fabab5400e066ad0 (diff)
Merge branch 'NixOS:master' into debug-exploratory-PR
Diffstat (limited to 'src/libexpr/eval-cache.cc')
-rw-r--r--src/libexpr/eval-cache.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc
index ed9af78b3..e9d9d02a4 100644
--- a/src/libexpr/eval-cache.cc
+++ b/src/libexpr/eval-cache.cc
@@ -673,7 +673,8 @@ std::vector<std::string> AttrCursor::getListOfStrings()
for (auto & elem : v.listItems())
res.push_back(std::string(root->state.forceStringNoCtx(*elem)));
- cachedValue = {root->db->setListOfStrings(getKey(), res), res};
+ if (root->db)
+ cachedValue = {root->db->setListOfStrings(getKey(), res), res};
return res;
}