aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-26 07:02:44 +0100
committerGitHub <noreply@github.com>2019-12-26 07:02:44 +0100
commit927a4f24e09e879ae1006aab32ead81985c61865 (patch)
tree5e1ead3a895263522c061d9de733514a86476f41 /src/nvim/lua/executor.c
parent5f1aec5abdb551e5f3035ca054d36580b3233efb (diff)
parent234c4a846bc78b2cc119b72b994b3ac3f401c8c3 (diff)
downloadrneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.gz
rneovim-927a4f24e09e879ae1006aab32ead81985c61865.tar.bz2
rneovim-927a4f24e09e879ae1006aab32ead81985c61865.zip
Merge #11612 from janlazo/clang-pvs
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 1d3d9929d3..2cd6c0db66 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -770,8 +770,10 @@ static void typval_exec_lua(const char *lcmd, size_t lcmd_len, const char *name,
typval_T *ret_tv)
{
if (check_restricted() || check_secure()) {
- ret_tv->v_type = VAR_NUMBER;
- ret_tv->vval.v_number = 0;
+ if (ret_tv) {
+ ret_tv->v_type = VAR_NUMBER;
+ ret_tv->vval.v_number = 0;
+ }
return;
}