m.type = MessageType::SIMCALLS_DEPENDENT;
m.obs1 = obs1.local();
m.obs2 = obs2.local();
+
+ if (m.obs1 == nullptr || m.obs2 == nullptr)
+ return true;
checker_side_.get_channel().send(m);
s_mc_message_simcalls_dependent_answer_t answer;
auto* obs2 = msg_simcalls->obs2;
bool res = true;
- if (obs1 != nullptr && obs2 != nullptr)
+ if (obs1 != nullptr && obs2 != nullptr) {
res = obs1->depends(obs2);
- XBT_DEBUG("return SIMCALLS_DEPENDENT(%s, %s) = %s", obs1->to_string(0).c_str(), obs2->to_string(0).c_str(),
- (res ? "true" : "false"));
+ XBT_DEBUG("return SIMCALLS_DEPENDENT(%s, %s) = %s", obs1->to_string(0).c_str(), obs2->to_string(0).c_str(),
+ (res ? "true" : "false"));
+ }
// Send result:
s_mc_message_simcalls_dependent_answer_t answer{MessageType::SIMCALLS_DEPENDENT_ANSWER, 0};