diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-11-10 15:37:05 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-11-10 15:37:05 +0100 |
commit | 27d9eceb66e5b71594dc547c5243eebc3c15e5b8 (patch) | |
tree | 437f370c6cd5a7546bc59aa13507eca9c818a338 /src/ex_getln.c | |
parent | 22e193ddd551cf67635e73231c259415bd70c135 (diff) | |
download | vim-git-27d9eceb66e5b71594dc547c5243eebc3c15e5b8.tar.gz |
updated for version 7.3.051v7.3.051
Problem: Crash when /home/mool/bin:/usr/local/sbin:/usr/local/bin:/home/mool/java/jdk/bin:/bin:/sbin:/usr/bin:/usr/games:/usr/sbin:/usr/X11R6/bin:/usr/local/linux-jdk1.3.1/bin:/usr/local/lib/python2.2/Tools/idle is empty.
Solution: Check for vim_getenv() returning NULL. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index c3514874f..c0d2496b8 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4747,7 +4747,11 @@ expand_shellcmd(filepat, num_file, file, flagsarg) || (pat[1] == '.' && vim_ispathsep(pat[2]))))) path = (char_u *)"."; else + { path = vim_getenv((char_u *)"PATH", &mustfree); + if (path == NULL) + path = (char_u *)""; + } /* * Go over all directories in $PATH. Expand matches in that directory and |