Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
9138:9beab1ecf2eb | 9139:ddca37101ffb |
---|---|
2564 &rettv, 1, argv, 0L, 0L, &dummy, TRUE, | 2564 &rettv, 1, argv, 0L, 0L, &dummy, TRUE, |
2565 channel->ch_close_partial, NULL); | 2565 channel->ch_close_partial, NULL); |
2566 clear_tv(&rettv); | 2566 clear_tv(&rettv); |
2567 channel_need_redraw = TRUE; | 2567 channel_need_redraw = TRUE; |
2568 } | 2568 } |
2569 --channel->ch_refcount; | |
2570 | 2569 |
2571 /* the callback is only called once */ | 2570 /* the callback is only called once */ |
2572 vim_free(channel->ch_close_cb); | 2571 vim_free(channel->ch_close_cb); |
2573 channel->ch_close_cb = NULL; | 2572 channel->ch_close_cb = NULL; |
2574 partial_unref(channel->ch_close_partial); | 2573 partial_unref(channel->ch_close_partial); |
2575 channel->ch_close_partial = NULL; | 2574 channel->ch_close_partial = NULL; |
2575 | |
2576 --channel->ch_refcount; | |
2576 | 2577 |
2577 if (channel_need_redraw) | 2578 if (channel_need_redraw) |
2578 { | 2579 { |
2579 channel_need_redraw = FALSE; | 2580 channel_need_redraw = FALSE; |
2580 redraw_after_callback(); | 2581 redraw_after_callback(); |