Mercurial > vim
diff src/channel.c @ 9139:ddca37101ffb v7.4.1853
commit https://github.com/vim/vim/commit/28ae5773422c2cf61aaf8d9d2b9fae70642d6a33
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 28 14:16:10 2016 +0200
patch 7.4.1853
Problem: Crash when job and channel are in the same dict while using
partials. (Luc Hermitte)
Solution: Do not decrement the channel reference count too early.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 May 2016 14:30:05 +0200 |
parents | dec3b7b977c0 |
children | b9c1a397a8a6 |
line wrap: on
line diff
--- a/src/channel.c +++ b/src/channel.c @@ -2566,7 +2566,6 @@ channel_close(channel_T *channel, int in clear_tv(&rettv); channel_need_redraw = TRUE; } - --channel->ch_refcount; /* the callback is only called once */ vim_free(channel->ch_close_cb); @@ -2574,6 +2573,8 @@ channel_close(channel_T *channel, int in partial_unref(channel->ch_close_partial); channel->ch_close_partial = NULL; + --channel->ch_refcount; + if (channel_need_redraw) { channel_need_redraw = FALSE;