patch 8.2.1037: Vim9: crash when using line continuation inside :def
Problem: Vim9: crash when using line continuation inside :def.
Solution: Check for no more lines available.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 033a8d9..30e447f 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2402,8 +2402,11 @@
while (++lnum < cctx->ctx_ufunc->uf_lines.ga_len)
{
char_u *line = ((char_u **)cctx->ctx_ufunc->uf_lines.ga_data)[lnum];
- char_u *p = skipwhite(line);
+ char_u *p;
+ if (line == NULL)
+ break;
+ p = skipwhite(line);
if (*p != NUL && !comment_start(p))
return p;
}