diff options
author | Alexander Shpilkin <ashpilkin@gmail.com> | 2022-05-04 22:13:49 +0300 |
---|---|---|
committer | Alexander Shpilkin <ashpilkin@gmail.com> | 2022-05-04 22:13:49 +0300 |
commit | b3ed32d0fd3dedd1428c069d20a35e1f8a26d566 (patch) | |
tree | 8b75cd5034f66567ccf5ffdac473b675b260748b /src | |
parent | 470e27ce8008ba952225b9f9f7f61a9627376f33 (diff) |
Add forgotten null check
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval-cache.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc index a1cb162ee..0eb4bc79e 100644 --- a/src/libexpr/eval-cache.cc +++ b/src/libexpr/eval-cache.cc @@ -648,7 +648,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; } |