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.
[simgrid.git] / 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);
 }
 
 /**