clang/'Logic error': set ret_tv if non-null

This commit is contained in:
Jan Edmund Lazo 2019-12-25 06:28:10 -05:00
parent 5f1aec5abd
commit c740e3b4b5
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -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;
}