From e4db7aedab65abadcc84c78e7a10ec7bb62f11cf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 13 Feb 2018 13:12:11 +0100 Subject: [PATCH] patch 8.0.1512: warning for possibly using NULL pointer Problem: Warning for possibly using NULL pointer. (Coverity) Solution: Skip using the pointer if it's NULL. --- src/ex_cmds.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 788e9eb82..a4d6221b0 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -6918,7 +6918,7 @@ fix_help_buffer(void) copy_option_part(&p, NameBuff, MAXPATHL, ","); mustfree = FALSE; rt = vim_getenv((char_u *)"VIMRUNTIME", &mustfree); - if (fullpathcmp(rt, NameBuff, FALSE) != FPC_SAME) + if (rt != NULL && fullpathcmp(rt, NameBuff, FALSE) != FPC_SAME) { int fcount; char_u **fnames; diff --git a/src/version.c b/src/version.c index a9643caea..965df225a 100644 --- a/src/version.c +++ b/src/version.c @@ -771,6 +771,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1512, /**/ 1511, /**/ -- 2.50.1