From a52c8775ea7ebcaa71502834b796e29623f8d320 Mon Sep 17 00:00:00 2001 From: thiery Date: Thu, 20 Jan 2011 17:36:34 +0000 Subject: [PATCH] Don't access a task that failed to be received git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9467 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/msg/gos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msg/gos.c b/src/msg/gos.c index 2ba058768f..e281bf7127 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -517,7 +517,8 @@ int MSG_comm_testany(xbt_dynar_t comms) */ void MSG_comm_destroy(msg_comm_t comm) { - if (SIMIX_req_comm_get_src_proc(comm) != SIMIX_process_self()) { + if (SIMIX_req_comm_get_src_proc(comm) != SIMIX_process_self() + && MSG_comm_get_status(comm) == MSG_OK) { m_task_t task; task = (m_task_t) SIMIX_req_comm_get_src_buff(comm); task->simdata->isused=0; -- 2.20.1