summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tty-term.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tty-term.c b/tty-term.c
index 2813be61..c96bdb12 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -196,7 +196,8 @@ tty_term_override(struct tty_term *term, const char *overrides)
case TTYCODE_NONE:
break;
case TTYCODE_STRING:
- xfree(code->value.string);
+ if (code->type == TTYCODE_STRING)
+ xfree(code->value.string);
code->value.string = xstrdup(val);
code->type = ent->type;
break;