changeset 9375:1f9172cbfef1 v7.4.1969

commit https://github.com/vim/vim/commit/24cf233ef9e92f947618c55d8bff423898a45c24 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 1 12:50:54 2016 +0200 patch 7.4.1969 Problem: When the netbeans channel is closed consuming the buffer may cause a crash. Solution: Check for nb_channel not to be NULL. (Xavier de Gaye)
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jul 2016 13:00:05 +0200
parents c873b3b5fe30
children 51f8cb5e7466
files src/netbeans.c src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -422,13 +422,14 @@ netbeans_parse_messages(void)
 	    buffer = node->rq_buffer;
 	}
 
-	/* now, parse and execute the commands */
+	/* Now, parse and execute the commands.  This may set nb_channel to
+	 * NULL if the channel is closed. */
 	nb_parse_cmd(buffer);
 
 	if (own_node)
 	    /* buffer finished, dispose of it */
 	    vim_free(buffer);
-	else
+	else if (nb_channel != NULL)
 	    /* more follows, move it to the start */
 	    channel_consume(nb_channel, PART_SOCK, (int)(p - buffer));
     }
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1969,
+/**/
     1968,
 /**/
     1967,