summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-08 16:41:09 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-08 16:41:09 +0200
commit27821260c0afaac85cb1c10627f1d7fbe48860ae (patch)
treeba2d2496dfc5c28db8bfb8f2f0e70d255dc3360d /src/term.c
parent98ffe4c6d8bded840436cfec0f26dd9c9bce4939 (diff)
downloadvim-git-27821260c0afaac85cb1c10627f1d7fbe48860ae.tar.gz
patch 8.1.1296: crash when using invalid command line argumentv8.1.1296
Problem: Crash when using invalid command line argument. Solution: Check for options not being initialized.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c
index bcc3dd387..462fe6f98 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3014,13 +3014,13 @@ term_settitle(char_u *title)
void
term_push_title(int which)
{
- if ((which & SAVE_RESTORE_TITLE) && *T_CST != NUL)
+ if ((which & SAVE_RESTORE_TITLE) && T_CST != NULL && *T_CST != NUL)
{
OUT_STR(T_CST);
out_flush();
}
- if ((which & SAVE_RESTORE_ICON) && *T_SSI != NUL)
+ if ((which & SAVE_RESTORE_ICON) && T_SSI != NULL && *T_SSI != NUL)
{
OUT_STR(T_SSI);
out_flush();
@@ -3033,13 +3033,13 @@ term_push_title(int which)
void
term_pop_title(int which)
{
- if ((which & SAVE_RESTORE_TITLE) && *T_CRT != NUL)
+ if ((which & SAVE_RESTORE_TITLE) && T_CRT != NULL && *T_CRT != NUL)
{
OUT_STR(T_CRT);
out_flush();
}
- if ((which & SAVE_RESTORE_ICON) && *T_SRI != NUL)
+ if ((which & SAVE_RESTORE_ICON) && T_SRI != NULL && *T_SRI != NUL)
{
OUT_STR(T_SRI);
out_flush();