mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
fix(api, lua): return NIL on failure to find converted function (#17779)
This commit is contained in:
@@ -477,8 +477,7 @@ static bool typval_conv_special = false;
|
||||
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
|
||||
do { \
|
||||
ufunc_T *fp = find_func(fun); \
|
||||
assert(fp != NULL); \
|
||||
if (fp->uf_cb == nlua_CFunction_func_call) { \
|
||||
if (fp != NULL && fp->uf_cb == nlua_CFunction_func_call) { \
|
||||
nlua_pushref(lstate, ((LuaCFunctionState *)fp->uf_cb_state)->lua_callable.func_ref); \
|
||||
} else { \
|
||||
TYPVAL_ENCODE_CONV_NIL(tv); \
|
||||
|
Reference in New Issue
Block a user