0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.0859: NULL pointer access when term_free_vterm called twice

Problem:    NULL pointer access when term_free_vterm called twice.
Solution:   Return when tl_vterm is NULL. (Yasuhiro Matsumoto, closes #1934)
This commit is contained in:
Bram Moolenaar
2017-08-04 20:29:53 +02:00
parent eb44a68b42
commit 8e5eece8c5
2 changed files with 6 additions and 1 deletions

View File

@@ -691,8 +691,11 @@ move_terminal_to_buffer(term_T *term)
VTermPos pos;
VTermScreenCell cell;
VTermScreenCell *p;
VTermScreen *screen = vterm_obtain_screen(term->tl_vterm);
VTermScreen *screen;
if (term->tl_vterm == NULL)
return;
screen = vterm_obtain_screen(term->tl_vterm);
for (pos.row = 0; pos.row < term->tl_rows; ++pos.row)
{
len = 0;