Problem: cd() with NULL argument crashes.
Solution: Check for NULL. (Ken Takata, closes #5558)
int dir_differs;
int retval = FALSE;
- if (allbuf_locked())
+ if (new_dir == NULL || allbuf_locked())
return FALSE;
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() && !forceit)
call assert_fails("call chdir('dir-abcd')", 'E472:')
silent! let d = chdir("dir_abcd")
call assert_equal("", d)
+ " Should not crash
+ call chdir(d)
only | tabonly
call chdir(topdir)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 189,
/**/
188,
/**/