diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-13 19:49:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-13 19:49:26 +0200 |
commit | 53efb18530cc3940d7af2ea338947783ea5495ed (patch) | |
tree | 55964df96711eb5a518f5a9b0129bff9eb5098e4 /src/spell.c | |
parent | 1e7b52ad8a5e34b9e7a2d12a09765d76d446cd5a (diff) |
patch 8.1.2147: crash when allocating memory failsv8.1.2147
Problem: Crash when allocating memory fails. (Zu-Ming Jiang)
Solution: Check that 'spellcapcheck' is not NULL. (closes #5048)
Diffstat (limited to 'src/spell.c')
-rw-r--r-- | src/spell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spell.c b/src/spell.c index 607bb392e5..04e4af601f 100644 --- a/src/spell.c +++ b/src/spell.c @@ -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 { |