]> source.dussan.org Git - rspamd.git/commitdiff
Fix assertion when using default configuration.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 16 Aug 2012 13:30:24 +0000 (17:30 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 16 Aug 2012 13:30:24 +0000 (17:30 +0400)
src/main.c

index 84bc63b554b85574321369e84690800c97f12874..a1999edc2c699c12172908114b2f0172e427b986 100644 (file)
@@ -192,7 +192,7 @@ read_cmd_line (gint argc, gchar **argv, struct config_file *cfg)
        cfg->config_test = config_test;
        cfg->rspamd_user = rspamd_user;
        cfg->rspamd_group = rspamd_group;
-       cfg_num = g_strv_length (cfg_names);
+       cfg_num = cfg_names != NULL ? g_strv_length (cfg_names) : 0;
        if (cfg_num == 0) {
                cfg->cfg_name = FIXED_CONFIG_FILE;
        }