summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-25 21:37:17 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-25 21:37:17 +0200
commit64354da438bc99a366a14f391f85c23af2907eb9 (patch)
treec70e1d7dacab245f803a0e557499c442b4cbe07f /src/memline.c
parentb230bd5a1660ba67bf8de73d59a02838a26c9922 (diff)
downloadvim-git-64354da438bc99a366a14f391f85c23af2907eb9.tar.gz
updated for version 7.2.438
Problem: "vim -r" crashes. Solution: Don't use NULL pointer argument.
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c
index c3fdba313..b38a46de7 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1439,15 +1439,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)
{