fix sync on sender less messages (rare crash)

This commit is contained in:
Green Sky 2024-04-22 22:27:49 +02:00
parent 2a717c216d
commit ecfaecd7f9
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ float ZoxNGCHistorySync::tick(float delta) {
continue;
}
if (!reg.all_of<Message::Components::ContactFrom>(msg_e)) {
std::cerr << "ZOX NGCHS error: msg without sender\n";
continue;
}
const auto& msg_sender = reg.get<Message::Components::ContactFrom>(msg_e).c;
if (!_cr.all_of<Contact::Components::ToxGroupPeerPersistent>(msg_sender)) {