summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-08-16 17:30:24 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-08-16 17:30:24 +0400
commitc6d5548c58c14005bba01b454485b589b71840ca (patch)
tree54e46fe3b9b47a5287bd56cbc57f591a7abf3e48
parentbdf60c8c30391eb30ac84b8869f412f5a45b5d11 (diff)
downloadrspamd-c6d5548c58c14005bba01b454485b589b71840ca.tar.gz
rspamd-c6d5548c58c14005bba01b454485b589b71840ca.zip
Fix assertion when using default configuration.
-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;
}