From: donassbr Date: Thu, 14 Jan 2010 15:09:07 +0000 (+0000) Subject: Add a test to avoid calling the function SIMIX_action_cancel with a NULL parameter. X-Git-Tag: SVN~724 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/42bf946d47bd0313ad9523434ab00fbad21318b2 Add a test to avoid calling the function SIMIX_action_cancel with a NULL parameter. It could happen when we tried to kill a process which was waiting for some communication. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7005 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 40face355c..bdca46119c 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -282,7 +282,8 @@ static inline void SIMIX_communication_wait_for_completion(smx_comm_t comm, doub */ XBT_INLINE void SIMIX_communication_cancel(smx_comm_t comm) { - SIMIX_action_cancel(comm->act); + if (comm->act) + SIMIX_action_cancel(comm->act); } /**