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.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 788e9eb..a4d6221 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6918,7 +6918,7 @@
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;