]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add fail-safe for composites processing
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 17 Jun 2023 14:45:39 +0000 (15:45 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 17 Jun 2023 14:45:39 +0000 (15:45 +0100)
src/libserver/symcache/symcache_c.cxx

index a2dc08a78d54f681f4874aa703b68c1b2bfc1bd3..3554bdcf2696afb875812dc7277ec761ed48911d 100644 (file)
@@ -698,7 +698,7 @@ rspamd_symcache_composites_foreach(struct rspamd_task *task,
        real_cache->composites_foreach([&](const auto *item) {
                auto *dyn_item = cache_runtime->get_dynamic_item(item->id);
 
-               if (!dyn_item->started) {
+               if (dyn_item && !dyn_item->started) {
                        auto *old_item = cache_runtime->set_cur_item(dyn_item);
                        func((void *)item->get_name().c_str(), item->get_cbdata(), fd);
                        dyn_item->finished = true;