diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-15 19:10:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-15 19:10:56 +0200 |
commit | 74f8eece5e481220e3c0767487c0bb59fa916ed6 (patch) | |
tree | 53821a3ba3698d4f33955caf6dc228a70db70f11 /src/testdir/test_popupwin.vim | |
parent | 209f0208f7831c6ab8f3f1cab473cb21e7985fc3 (diff) |
patch 8.2.1848: crash when passing a NULL string or list to popup_settext()v8.2.1848
Problem: Crashyyyyy passing a NULL string or list to popup_settext().
Solution: Check for NULL pointers. (closes #7132)
Diffstat (limited to 'src/testdir/test_popupwin.vim')
-rw-r--r-- | src/testdir/test_popupwin.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 187b4f13eb..1524e78563 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -2363,6 +2363,16 @@ func Test_popup_settext_getline() call popup_close(id) endfunc +func Test_popup_settext_null() + let id = popup_create('', #{ tabpage: 0 }) + call popup_settext(id, test_null_list()) + call popup_close(id) + + let id = popup_create('', #{ tabpage: 0 }) + call popup_settext(id, test_null_string()) + call popup_close(id) +endfunc + func Test_popup_hidden() new |