summaryrefslogtreecommitdiff
path: root/src/if_lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_lua.c')
-rw-r--r--src/if_lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/if_lua.c b/src/if_lua.c
index e873b6bf7..ce65fd2f6 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -464,7 +464,8 @@ luaV_pushtypval(lua_State *L, typval_T *tv)
switch (tv->v_type)
{
case VAR_STRING:
- lua_pushstring(L, (char *) tv->vval.v_string);
+ lua_pushstring(L, tv->vval.v_string == NULL
+ ? "" : (char *)tv->vval.v_string);
break;
case VAR_NUMBER:
lua_pushinteger(L, (int) tv->vval.v_number);