# HG changeset patch # User Bram Moolenaar # Date 1640365203 -3600 # Node ID 0c5daf5e5514e480a99049d77e31249fbfbd6c55 # Parent f0d7cb510ce343ac63c06fd900496815da25b31a patch 8.2.3883: crash when switching to other regexp engine fails Commit: https://github.com/vim/vim/commit/5937c7505f444dd896f336fa0119a93a55ebe9a2 Author: Bram Moolenaar Date: Fri Dec 24 16:46:14 2021 +0000 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. diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4975,6 +4975,8 @@ ex_global(exarg_T *eap) // a match on this line? match = vim_regexec_multi(®match, 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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3883, +/**/ 3882, /**/ 3881,