aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libq/tree.c')
-rw-r--r--libq/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libq/tree.c b/libq/tree.c
index a05a86e..f308c8d 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -1709,7 +1709,8 @@ tree_match_atom_cache_populate_cb(tree_pkg_ctx *ctx, void *priv)
cat_ctx = get_set(atom->CATEGORY, cache);
if (cat_ctx == NULL) {
cat_ctx = tree_open_cat(tctx, ".");
- cache = add_set_value(atom->CATEGORY, cat_ctx, NULL, cache);
+ if (cache != NULL) /* for static code analysers */
+ add_set_value(atom->CATEGORY, cat_ctx, NULL, cache);
/* get a pointer from the set */
cat_ctx->name = contains_set(atom->CATEGORY, cache);
}