Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a test to avoid calling the function SIMIX_action_cancel with a NULL parameter.
authordonassbr <donassbr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 14 Jan 2010 15:09:07 +0000 (15:09 +0000)
committerdonassbr <donassbr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 14 Jan 2010 15:09:07 +0000 (15:09 +0000)
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

src/simix/smx_network.c

index 40face3..bdca461 100644 (file)
@@ -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);
 }
 
 /**