]> granicus.if.org Git - vim/commitdiff
patch 7.4.1969 v7.4.1969
authorBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2016 10:50:54 +0000 (12:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2016 10:50:54 +0000 (12:50 +0200)
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)

src/netbeans.c
src/version.c

index 46d725bfa9912c77e7cf97b9cc46796ad05e4027..f674a78a96f9df3612de3c9ec5cb38f00a6b9c6e 100644 (file)
@@ -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));
     }
index 2a3ded76335a88daeedde73254b24ab1b89afbff..8e9da45f831f580cb868725ba218b37ed804035f 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1969,
 /**/
     1968,
 /**/