0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2016-07-01 12:50:54 +02:00
parent 1d90a5a5af
commit 24cf233ef9
2 changed files with 5 additions and 2 deletions

View 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));
}