comparison src/popupwin.c @ 18162:9c3347b21b89 v8.1.2076

patch 8.1.2076: crash when trying to put a terminal in a popup window Commit: https://github.com/vim/vim/commit/e0d749a49630778d45642d7589a3703697746760 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 25 22:14:48 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Sep 2019 22:15:03 +0200
parents 364a9be6a21e
children 8d7899bd6bca
comparison
equal deleted inserted replaced
18161:94e3c1e4d5ae 18162:9c3347b21b89
1636 if (buf == NULL) 1636 if (buf == NULL)
1637 { 1637 {
1638 semsg(_(e_nobufnr), argvars[0].vval.v_number); 1638 semsg(_(e_nobufnr), argvars[0].vval.v_number);
1639 return NULL; 1639 return NULL;
1640 } 1640 }
1641 if (buf->b_term != NULL)
1642 {
1643 emsg(_("E278: Cannot put a terminal buffer in a popup window"));
1644 return NULL;
1645 }
1641 } 1646 }
1642 else if (!(argvars[0].v_type == VAR_STRING 1647 else if (!(argvars[0].v_type == VAR_STRING
1643 && argvars[0].vval.v_string != NULL) 1648 && argvars[0].vval.v_string != NULL)
1644 && !(argvars[0].v_type == VAR_LIST 1649 && !(argvars[0].v_type == VAR_LIST
1645 && argvars[0].vval.v_list != NULL)) 1650 && argvars[0].vval.v_list != NULL))