mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
fix(api, lua): return NIL on failure to find converted function (#17779)
This commit is contained in:
@@ -65,8 +65,7 @@ typedef struct {
|
||||
#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) { \
|
||||
LuaRef ref = api_new_luaref(((LuaCFunctionState *)fp->uf_cb_state)->lua_callable.func_ref); \
|
||||
kvi_push(edata->stack, LUAREF_OBJ(ref)); \
|
||||
} else { \
|
||||
|
Reference in New Issue
Block a user