summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c3
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;