* fix crash when the env requested isn't set
authorWilfried Göesgens <willi@citadel.org>
Sun, 15 Aug 2010 12:11:47 +0000 (12:11 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 15 Aug 2010 12:11:47 +0000 (12:11 +0000)
citadel/utils/setup.c

index 4a90f6c950859f1c1d4d34e90c867bfe3f152483..01135119179b22ced4d91b7c1777bc601b1e6004 100644 (file)
@@ -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)