forked from aniani/vim
patch 8.1.1296: crash when using invalid command line argument
Problem: Crash when using invalid command line argument. Solution: Check for options not being initialized.
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user