mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.2.438
Problem: "vim -r" crashes. Solution: Don't use NULL pointer argument.
This commit is contained in:
parent
b230bd5a16
commit
64354da438
@ -1439,15 +1439,22 @@ recover_names(fname, list, nr)
|
|||||||
int i;
|
int i;
|
||||||
char_u *dirp;
|
char_u *dirp;
|
||||||
char_u *dir_name;
|
char_u *dir_name;
|
||||||
char_u *fname_res = *fname;
|
char_u *fname_res = NULL;
|
||||||
#ifdef HAVE_READLINK
|
#ifdef HAVE_READLINK
|
||||||
char_u fname_buf[MAXPATHL];
|
char_u fname_buf[MAXPATHL];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (fname != NULL)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_READLINK
|
||||||
/* Expand symlink in the file name, because the swap file is created with
|
/* Expand symlink in the file name, because the swap file is created with
|
||||||
* the actual file instead of with the symlink. */
|
* the actual file instead of with the symlink. */
|
||||||
if (resolve_symlink(*fname, fname_buf) == OK)
|
if (resolve_symlink(*fname, fname_buf) == OK)
|
||||||
fname_res = fname_buf;
|
fname_res = fname_buf;
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
fname_res = *fname;
|
||||||
|
}
|
||||||
|
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user