diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-27 21:27:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-27 21:27:03 +0100 |
commit | 06d626032330dc79825004f9cba7d154c9c90cbc (patch) | |
tree | ec368f4aa7ac4698575feea84e3b1b9900dbb5cd /src/terminal.c | |
parent | 6436cd83f90a0efc326798792e49e8ff96a43dce (diff) | |
download | vim-git-06d626032330dc79825004f9cba7d154c9c90cbc.tar.gz |
patch 8.1.0645: Coverity warns for possible use of NULL pointerv8.1.0645
Problem: Coverity warns for possible use of NULL pointer.
Solution: Check return value of vterm_obtain_screen().
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index 1875cc3e3..d030f6d70 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -5060,6 +5060,8 @@ f_term_scrape(typval_T *argvars, typval_T *rettv) if (term->tl_vterm != NULL) { screen = vterm_obtain_screen(term->tl_vterm); + if (screen == NULL) // can't really happen + return; p = NULL; line = NULL; } |