diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-01 12:50:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-01 12:50:54 +0200 |
commit | 24cf233ef9e92f947618c55d8bff423898a45c24 (patch) | |
tree | fed6090fc145fdb2091063f591ab766810ba9a6e /src/netbeans.c | |
parent | 1d90a5a5af84250e226f8a9121e771f7b72aa894 (diff) | |
download | vim-git-24cf233ef9e92f947618c55d8bff423898a45c24.tar.gz |
patch 7.4.1969v7.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)
Diffstat (limited to 'src/netbeans.c')
-rw-r--r-- | src/netbeans.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/netbeans.c b/src/netbeans.c index 46d725bfa..f674a78a9 100644 --- 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)); } |