diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-07 20:18:16 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-07 20:18:16 +0000 |
commit | 62a099cc6dbfc31c0ced3f6d895711208bf10518 (patch) | |
tree | fe990908fafea10cc1ed04dea39b028ee3ea9774 | |
parent | a4c96252b12c9ebc0ba563694c064e500d707b06 (diff) | |
download | vim-git-62a099cc6dbfc31c0ced3f6d895711208bf10518.tar.gz |
patch 8.2.4034: Coverity warns for possibly using a NULL pointerv8.2.4034
Problem: Coverity warns for possibly using a NULL pointer.
Solution: Check v_partial is not NULL.
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9type.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index 7f01ebe9f..e2b5023e3 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4034, +/**/ 4033, /**/ 4032, diff --git a/src/vim9type.c b/src/vim9type.c index f28b88f23..6671f5e3d 100644 --- a/src/vim9type.c +++ b/src/vim9type.c @@ -375,7 +375,7 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags) set_function_type(ufunc); if (ufunc->uf_func_type != NULL) { - if (tv->v_type == VAR_PARTIAL + if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL && tv->vval.v_partial->pt_argc > 0) { type = get_type_ptr(type_gap); |