1
0
forked from aniani/vim

patch 8.2.3756: might crash when callback is not valid

Problem:    might crash when callback is not valid.
Solution:   Check for valid callback. (Yegappan Lakshmanan, closes #9293)
This commit is contained in:
Yegappan Lakshmanan
2021-12-07 12:23:57 +00:00
committed by Bram Moolenaar
parent 92c33eb273
commit 4dc24eb5ad
9 changed files with 59 additions and 8 deletions

View File

@@ -2329,14 +2329,12 @@ set_thesaurusfunc_option(void)
if (*curbuf->b_p_tsrfu != NUL)
{
// buffer-local option set
free_callback(&curbuf->b_tsrfu_cb);
retval = option_set_callback_func(curbuf->b_p_tsrfu,
&curbuf->b_tsrfu_cb);
}
else
{
// global option set
free_callback(&tsrfu_cb);
retval = option_set_callback_func(p_tsrfu, &tsrfu_cb);
}