mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
clang/"null pointer dereference" #10755
This commit is contained in:
parent
5e1acd412b
commit
947bd293c9
@ -3672,28 +3672,28 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
// Execute user defined complete function 'completefunc' or 'omnifunc', and
|
||||||
* Execute user defined complete function 'completefunc' or 'omnifunc', and
|
// get matches in "matches".
|
||||||
* get matches in "matches".
|
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
expand_by_function (
|
expand_by_function(
|
||||||
int type, /* CTRL_X_OMNI or CTRL_X_FUNCTION */
|
int type, // CTRL_X_OMNI or CTRL_X_FUNCTION
|
||||||
char_u *base
|
char_u *base
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
list_T *matchlist = NULL;
|
list_T *matchlist = NULL;
|
||||||
dict_T *matchdict = NULL;
|
dict_T *matchdict = NULL;
|
||||||
char_u *funcname;
|
char_u *funcname;
|
||||||
pos_T pos;
|
pos_T pos;
|
||||||
win_T *curwin_save;
|
win_T *curwin_save;
|
||||||
buf_T *curbuf_save;
|
buf_T *curbuf_save;
|
||||||
typval_T rettv;
|
typval_T rettv;
|
||||||
const int save_State = State;
|
const int save_State = State;
|
||||||
|
|
||||||
|
assert(curbuf != NULL);
|
||||||
funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
|
funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
|
||||||
if (*funcname == NUL)
|
if (*funcname == NUL) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Call 'completefunc' to obtain the list of matches.
|
// Call 'completefunc' to obtain the list of matches.
|
||||||
typval_T args[3];
|
typval_T args[3];
|
||||||
|
Loading…
Reference in New Issue
Block a user