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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index bf5f81c..17c5606 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8228,6 +8228,7 @@
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 @@
* name. */
vim_free(globaldir);
globaldir = NULL;
- curwin->w_localdir = NULL;
}
shorten_fnames(TRUE);