diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-07 20:10:43 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-07 20:10:43 +0200 |
commit | 303215d60cece0462f040035502b5bc95373bd6e (patch) | |
tree | 7205c8883ce386de1d5b6819dff26f399b8f01c8 /src/vim9execute.c | |
parent | b5098060f4acae4dac3203130278c948d670a3d5 (diff) | |
download | vim-git-303215d60cece0462f040035502b5bc95373bd6e.tar.gz |
patch 8.2.3116: Vim9: crash when debugging a function with line continuationv8.2.3116
Problem: Vim9: crash when debugging a function with line continuation.
Solution: Check for a NULL pointer. (closes #8521)
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index b194e6a2a..87f3c424e 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1497,9 +1497,11 @@ handle_debug(isn_T *iptr, ectx_T *ectx) ga_init2(&ga, sizeof(char_u *), 10); for (lnum = iptr->isn_lnum; lnum < end_lnum; ++lnum) { - char_u *p = skipwhite( - ((char_u **)ufunc->uf_lines.ga_data)[lnum - 1]); + char_u *p = ((char_u **)ufunc->uf_lines.ga_data)[lnum - 1]; + if (p == NULL) + continue; // left over from continuation line + p = skipwhite(p); if (*p == '#') break; if (ga_grow(&ga, 1) == OK) |