Mercurial > vim
comparison src/ex_getln.c @ 2630:0de47f0d731e v7.3.051
updated for version 7.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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 10 Nov 2010 15:37:05 +0100 |
parents | f2927225367a |
children | 6ee9d7fa5df6 |
comparison
equal
deleted
inserted
replaced
2629:1ccc1ace9e5b | 2630:0de47f0d731e |
---|---|
4745 path = (char_u *)" "; | 4745 path = (char_u *)" "; |
4746 else if ((pat[0] == '.' && (vim_ispathsep(pat[1]) | 4746 else if ((pat[0] == '.' && (vim_ispathsep(pat[1]) |
4747 || (pat[1] == '.' && vim_ispathsep(pat[2]))))) | 4747 || (pat[1] == '.' && vim_ispathsep(pat[2]))))) |
4748 path = (char_u *)"."; | 4748 path = (char_u *)"."; |
4749 else | 4749 else |
4750 { | |
4750 path = vim_getenv((char_u *)"PATH", &mustfree); | 4751 path = vim_getenv((char_u *)"PATH", &mustfree); |
4752 if (path == NULL) | |
4753 path = (char_u *)""; | |
4754 } | |
4751 | 4755 |
4752 /* | 4756 /* |
4753 * Go over all directories in $PATH. Expand matches in that directory and | 4757 * Go over all directories in $PATH. Expand matches in that directory and |
4754 * collect them in "ga". | 4758 * collect them in "ga". |
4755 */ | 4759 */ |