aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-11-15 20:45:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-11-15 20:45:29 +0000
commit3b91db110b2b60e40eb90e2f6353414b584d9d41 (patch)
tree0266fa0f2edf761baf98f58e493520e65bb3cf15
parentab9dfac24e59b8e85f7c957a27561296c31f96c7 (diff)
fixed crash in config file parser
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 82cee7313..9e5145ce0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1016,7 +1016,7 @@ static int parseconfig(char *filename,
res = getparameter(tok1 + 1, tok2, &usedarg, config);
free(tok1);
if (!usedarg) {
- if ('-' != tok2[0]) {
+ if (tok2 && ('-' != tok2[0])) {
/* this is not an option, this is a URL */
if (config->url)
free(config->url);