1
0
forked from aniani/vim

patch 8.2.3883: crash when switching to other regexp engine fails

Problem:    Crash when switching to other regexp engine fails.
Solution:   Check for regprog being NULL.
This commit is contained in:
Bram Moolenaar
2021-12-24 16:46:14 +00:00
parent fa3b72348d
commit 5937c7505f
2 changed files with 4 additions and 0 deletions

View File

@@ -4975,6 +4975,8 @@ ex_global(exarg_T *eap)
// a match on this line?
match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
(colnr_T)0, NULL, NULL);
if (regmatch.regprog == NULL)
break; // re-compiling regprog failed
if ((type == 'g' && match) || (type == 'v' && !match))
{
ml_setmarked(lnum);