forked from aniani/vim
patch 8.1.2147: crash when allocating memory fails
Problem: Crash when allocating memory fails. (Zu-Ming Jiang) Solution: Check that 'spellcapcheck' is not NULL. (closes #5048)
This commit is contained in:
@@ -4367,7 +4367,7 @@ compile_cap_prog(synblock_T *synblock)
|
||||
regprog_T *rp = synblock->b_cap_prog;
|
||||
char_u *re;
|
||||
|
||||
if (*synblock->b_p_spc == NUL)
|
||||
if (synblock->b_p_spc == NULL || *synblock->b_p_spc == NUL)
|
||||
synblock->b_cap_prog = NULL;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user