diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-13 13:12:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-13 13:12:11 +0100 |
commit | e4db7aedab65abadcc84c78e7a10ec7bb62f11cf (patch) | |
tree | cea60f8c2cef778a8c9f543e07a40f11ba7bbab4 /src/ex_cmds.c | |
parent | 3198870137df64214317151726648af8e56f1729 (diff) | |
download | vim-e4db7aedab65abadcc84c78e7a10ec7bb62f11cf.zip |
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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |