diff --git a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/spaces/AbstractEventSpace.sarl b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/spaces/AbstractEventSpace.sarl index 1eb8e3f736..d99ddbf06d 100644 --- a/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/spaces/AbstractEventSpace.sarl +++ b/sre/io.janusproject/io.janusproject.plugin/src/main/sarl/io/sarl/sre/spaces/AbstractEventSpace.sarl @@ -212,10 +212,11 @@ abstract class AbstractEventSpace extends AbstractSpace implements EventSpace, S // The reception process should be treated into a separate thread in order // to never block the sender process. val participants = getScopedParticipants(scope) - participants.forEach [ - it.getParticipant.receiveEvent(^event) - ] - + if (participants !== null) { + for (it : participants) { + it.getParticipant.receiveEvent(^event) + } + } } }