From b3ed32d0fd3dedd1428c069d20a35e1f8a26d566 Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Wed, 4 May 2022 22:13:49 +0300 Subject: [PATCH] Add forgotten null check --- src/libexpr/eval-cache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 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; }