diff src/eval.c @ 8870:30988ffb7498 v7.4.1722

commit https://github.com/vim/vim/commit/0239acb11fe4bfe9b525ea90b782759da5eb7704 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 11 21:02:54 2016 +0200 patch 7.4.1722 Problem: Crash when calling garbagecollect() after starting a job. Solution: Set the copyID on job and channel. (Hirohito Higashi, Ozaki Kiichi)
author Christian Brabandt <cb@256bit.org>
date Mon, 11 Apr 2016 21:15:05 +0200
parents e1b84109506a
children 50e40f322e78
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -7326,6 +7326,7 @@ set_ref_in_item(
 
 	if (job != NULL && job->jv_copyID != copyID)
 	{
+	    job->jv_copyID = copyID;
 	    if (job->jv_channel != NULL)
 	    {
 		dtv.v_type = VAR_CHANNEL;
@@ -7350,6 +7351,7 @@ set_ref_in_item(
 
 	if (ch != NULL && ch->ch_copyID != copyID)
 	{
+	    ch->ch_copyID = copyID;
 	    for (part = PART_SOCK; part <= PART_IN; ++part)
 	    {
 		for (jq = ch->ch_part[part].ch_json_head.jq_next; jq != NULL;