]> granicus.if.org Git - vim/commitdiff
patch 8.0.1619: Win32 GUI: crash when winpty is not installed v8.0.1619
authorBram Moolenaar <Bram@vim.org>
Tue, 20 Mar 2018 10:41:44 +0000 (11:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 20 Mar 2018 10:41:44 +0000 (11:41 +0100)
Problem:    Win32 GUI: crash when winpty is not installed and trying to use
            :shell in a terminal window.
Solution:   Check for NULL return form term_start(). (Yasuhiro Matsumoto,
            closes #2727)

src/os_win32.c
src/version.c

index b70a0025d1d2d02cd51fc634d2e6b322f104f653..0cb311337d4b389885406928f0f4eee0cabbe357 100644 (file)
@@ -4824,6 +4824,8 @@ mch_call_shell_terminal(
     argvar[0].vval.v_string = newcmd;
     argvar[1].v_type = VAR_UNKNOWN;
     buf = term_start(argvar, NULL, &opt, TERM_START_SYSTEM);
+    if (buf == NULL)
+       return 255;
 
     /* Find a window to make "buf" curbuf. */
     aucmd_prepbuf(&aco, buf);
index 35feb7698d581f2b966d98af05396885e5add4e6..6ac9000dba0f500cf5f2a245c64362bb3adf826c 100644 (file)
@@ -766,6 +766,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1619,
 /**/
     1618,
 /**/