0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2014-01-10 15:53:13 +01:00
parent 4ea924e0a5
commit bd2dc34774
3 changed files with 5 additions and 3 deletions

View File

@@ -1216,8 +1216,8 @@ win_init(newp, oldp, flags)
else
copy_loclist(oldp, newp);
#endif
if (oldp->w_localdir != NULL)
newp->w_localdir = vim_strsave(oldp->w_localdir);
newp->w_localdir = (oldp->w_localdir == NULL)
? NULL : vim_strsave(oldp->w_localdir);
/* copy tagstack and folds */
for (i = 0; i < oldp->w_tagstacklen; i++)