A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sonar don't like comments ending with ';'
[simgrid.git]
/
src
/
kernel
/
activity
/
MailboxImpl.cpp
diff --git
a/src/kernel/activity/MailboxImpl.cpp
b/src/kernel/activity/MailboxImpl.cpp
index
bed10c2
..
8a68981
100644
(file)
--- a/
src/kernel/activity/MailboxImpl.cpp
+++ b/
src/kernel/activity/MailboxImpl.cpp
@@
-53,7
+53,10
@@
MailboxImpl* MailboxImpl::byNameOrCreate(const char* name)
*/
void MailboxImpl::setReceiver(s4u::ActorPtr actor)
{
*/
void MailboxImpl::setReceiver(s4u::ActorPtr actor)
{
- this->permanent_receiver = actor.get()->getImpl();
+ if (actor != nullptr)
+ this->permanent_receiver = actor.get()->getImpl();
+ else
+ this->permanent_receiver = nullptr;
}
/** @brief Pushes a communication activity into a mailbox
* @param comm What to add
}
/** @brief Pushes a communication activity into a mailbox
* @param comm What to add