summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/actions.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 24ae6f1..b4d5389 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-05 Shawn Betts <katia_dilkina@verizon.net>
+
+ * src/actions.c (cmd_set): check if var is NULL before checking strlen(var)
+
2004-10-07 Shawn Betts <sabetts@vcn.bc.ca>
* doc/ratpoison.texi (Frame Numbering): new topic
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;