]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.438
authorBram Moolenaar <Bram@vim.org>
Tue, 25 May 2010 19:37:17 +0000 (21:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 25 May 2010 19:37:17 +0000 (21:37 +0200)
Problem:    "vim -r" crashes.
Solution:   Don't use NULL pointer argument.

src/memline.c

index c3fdba313768a3633d0a4b3df194c113249a9d25..b38a46de7c626b6b057df24b603eab1d461424e5 100644 (file)
@@ -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)
     {