diff src/ex_docmd.c @ 5584:c8c80c9d2e22 v7.4.139

updated for version 7.4.139 Problem: Crash when using :cd in autocommand. (Fran?ois Ingelrest) Solution: Set w_localdir to NULL after freeing it. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Fri, 10 Jan 2014 15:53:13 +0100
parents 4b23119cb584
children 4e3a9dd25d42
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8228,6 +8228,7 @@ post_chdir(local)
     int		local;
 {
     vim_free(curwin->w_localdir);
+    curwin->w_localdir = NULL;
     if (local)
     {
 	/* If still in global directory, need to remember current
@@ -8244,7 +8245,6 @@ post_chdir(local)
 	 * name. */
 	vim_free(globaldir);
 	globaldir = NULL;
-	curwin->w_localdir = NULL;
     }
 
     shorten_fnames(TRUE);