0
0
mirror of https://github.com/vim/vim.git synced 2025-11-09 10:37:17 -05:00

patch 8.1.2076: crash when trying to put a terminal in a popup window

Problem:    Crash when trying to put a terminal buffer in a popup window.
Solution:   Check for NULL buffer.  Do not allow putting a terminal in a popup
            window.
This commit is contained in:
Bram Moolenaar
2019-09-25 22:14:48 +02:00
parent 101e99207f
commit e0d749a496
6 changed files with 23 additions and 4 deletions

View File

@@ -1638,6 +1638,11 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
semsg(_(e_nobufnr), argvars[0].vval.v_number);
return NULL;
}
if (buf->b_term != NULL)
{
emsg(_("E278: Cannot put a terminal buffer in a popup window"));
return NULL;
}
}
else if (!(argvars[0].v_type == VAR_STRING
&& argvars[0].vval.v_string != NULL)