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:
committed by
Bram Moolenaar
parent
92c33eb273
commit
4dc24eb5ad
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user