diff options
author | sabetts <sabetts> | 2004-10-25 21:58:22 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2004-10-25 21:58:22 +0000 |
commit | abf452c7c0d30acd1c7d669ffa80dbee1f90cb59 (patch) | |
tree | be1d2a2560f2c6451f12ee04d33ef736e0c33344 /src/actions.c | |
parent | df762c8d7ec794c682634ee3ec79490182fd2f0d (diff) | |
download | ratpoison-abf452c7c0d30acd1c7d669ffa80dbee1f90cb59.zip |
(cmd_set): check if var is NULL before checking strlen(var)
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c index a5c7165..e7c283d 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2761,7 +2761,6 @@ char * cmd_unsetenv (int interactive, char *data) { struct sbuf *s; - char *str; if (data == NULL) { @@ -4272,7 +4271,7 @@ cmd_set (int interactive, char *data) { char *tmp; var = get_input (MESSAGE_PROMPT_SELECT_VAR, var_completions); - if (strlen (var) == 0) + if (var == NULL || strlen (var) == 0) { free (var); return NULL; |