0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

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.
This commit is contained in:
Bram Moolenaar 2018-02-13 13:12:11 +01:00
parent 3198870137
commit e4db7aedab
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1512,
/**/
1511,
/**/