summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 84bc63b55..a1999edc2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}