Mercurial > vim
changeset 2175:d44112feb815 v7.2.438
updated for version 7.2.438
Problem: "vim -r" crashes.
Solution: Don't use NULL pointer argument.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 25 May 2010 21:37:17 +0200 |
parents | ecb9c2b70b0f |
children | ea7c2d89b76b |
files | src/memline.c src/version.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memline.c +++ b/src/memline.c @@ -1404,15 +1404,22 @@ recover_names(fname, list, nr) int i; char_u *dirp; char_u *dir_name; - char_u *fname_res = *fname; + char_u *fname_res = NULL; #ifdef HAVE_READLINK 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 * the actual file instead of with the symlink. */ if (resolve_symlink(*fname, fname_buf) == OK) fname_res = fname_buf; + else #endif + fname_res = *fname; + } if (list) {