From: Wilfried Göesgens Date: Sun, 15 Aug 2010 12:11:47 +0000 (+0000) Subject: * fix crash when the env requested isn't set X-Git-Tag: v8.01~252^2~649 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=5770c4dbab66576aeb8fe03dceebf6a45d162b16;p=citadel.git * fix crash when the env requested isn't set --- diff --git a/citadel/utils/setup.c b/citadel/utils/setup.c index 4a90f6c95..011351191 100644 --- a/citadel/utils/setup.c +++ b/citadel/utils/setup.c @@ -834,16 +834,21 @@ void strprompt(const char *prompt_title, char *prompt_text, char *Target, char * } } -void set_bool_val(int msgpos, int *ip, char *DefValue) { +void set_bool_val(int msgpos, int *ip, char *DefValue) +{ title(setup_titles[msgpos]); *ip = yesno(setup_text[msgpos], *ip); } -void set_str_val(int msgpos, char *Target, char *DefValue) { - strprompt(setup_titles[msgpos], - setup_text[msgpos], - Target, - DefValue); +void set_str_val(int msgpos, char *Target, char *DefValue) +{ + if (DefValue != NULL) + { + strprompt(setup_titles[msgpos], + setup_text[msgpos], + Target, + DefValue); + } } void set_int_val(int msgpos, int *ip, char *DefValue)