diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-11 15:54:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-11 15:54:00 +0100 |
commit | 5fd8b78214a52b561780eb5ba000b1a3f5ba1d3d (patch) | |
tree | ce77a681acf5a5a2abee9392a3f1781a3b85d5ce /src/channel.c | |
parent | d09a206ee94ccb653707ce9b6e536d4d58886e04 (diff) | |
download | vim-git-5fd8b78214a52b561780eb5ba000b1a3f5ba1d3d.tar.gz |
patch 8.0.1286: occasional crash when using a channelv8.0.1286
Problem: Occasional crash when using a channel. (Marek)
Solution: Decrement reference count later. (closes #2315)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channel.c b/src/channel.c index 606c66a86..8fc705058 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2898,8 +2898,6 @@ channel_close(channel_T *channel, int invoke_close_cb) channel->ch_close_cb = NULL; channel->ch_close_partial = NULL; - --channel->ch_refcount; - if (channel_need_redraw) { channel_need_redraw = FALSE; @@ -2910,6 +2908,8 @@ channel_close(channel_T *channel, int invoke_close_cb) /* any remaining messages are useless now */ for (part = PART_SOCK; part < PART_IN; ++part) drop_messages(channel, part); + + --channel->ch_refcount; } } |