]> source.dussan.org Git - rspamd.git/commitdiff
Fix core dumps when no symbols are found in a message.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 Jul 2011 14:01:09 +0000 (18:01 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 Jul 2011 14:01:09 +0000 (18:01 +0400)
src/protocol.c

index 3eae408de1e8fb3d29d09eada355f401f289ff11..efce45f7a6c3e2b2444e0788876472ddc41ce537 100644 (file)
@@ -1088,7 +1088,7 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data
                m = g_hash_table_lookup (task->cfg->metrics, DEFAULT_METRIC);
                default_required_score = m->required_score;
                default_score = 0;
-               if (!check_metric_settings (metric_res, &ms, &rs)) {
+               if (metric_res != NULL && !check_metric_settings (metric_res, &ms, &rs)) {
                        ms = m->required_score;
                        rs = m->reject_score;
                }