diff options
author | James McCoy <jamessan@jamessan.com> | 2022-01-19 21:43:06 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2022-01-19 21:43:09 -0500 |
commit | 8f241e535fe845814a195bc5811dac4869a26998 (patch) | |
tree | 5f0fead7d7c774986035c44d2e8e78941236f575 | |
parent | 0c541ab1f661f17aef317232483d1464ad13ef36 (diff) | |
download | rneovim-8f241e535fe845814a195bc5811dac4869a26998.tar.gz rneovim-8f241e535fe845814a195bc5811dac4869a26998.tar.bz2 rneovim-8f241e535fe845814a195bc5811dac4869a26998.zip |
refactor(coverity/345583): assert fp is non-NULL
Since we already have a typval, we know the lookup will succeed.
-rw-r--r-- | src/nvim/lua/converter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c index f9a2533d4e..0fbd56ed53 100644 --- a/src/nvim/lua/converter.c +++ b/src/nvim/lua/converter.c @@ -619,6 +619,7 @@ bool nlua_push_typval(lua_State *lstate, typval_T *const tv, bool special) } if (tv->v_type == VAR_FUNC) { ufunc_T *fp = find_func(tv->vval.v_string); + assert(fp != NULL); if (fp->uf_cb == nlua_CFunction_func_call) { nlua_pushref(lstate, ((LuaCFunctionState *)fp->uf_cb_state)->lua_callable.func_ref); return true; |