Commit d35140e7 authored by Andrea Gianarda's avatar Andrea Gianarda
Browse files

Do not send notify if device or participant to be removed is NULL

parent f01d607b
......@@ -1263,6 +1263,7 @@ shared_ptr<Participant> ServerGroupChatRoom::findParticipant (const shared_ptr<c
if (device || (participant->getSession() == session))
return participant;
}
lInfo() << "Unable to find participant in server group chat room " << this << " with call session " << session;
return nullptr;
}
......@@ -1273,6 +1274,7 @@ shared_ptr<Participant> ServerGroupChatRoom::findParticipant (const IdentityAddr
if (participant->getAddress() == searchedAddr)
return participant;
}
lInfo() << "Unable to find participant in server group chat room " << this << " with address " << participantAddress.asString();
return nullptr;
}
......
......@@ -182,6 +182,7 @@ shared_ptr<Participant> Conference::findParticipant (const IdentityAddress &addr
}
}
lInfo() << "Unable to find participant in conference " << this << " with address " << addr.asString();
return nullptr;
}
......@@ -191,6 +192,7 @@ shared_ptr<Participant> Conference::findParticipant (const shared_ptr<const Call
if (participant->getSession() == session)
return participant;
}
lInfo() << "Unable to find participant in conference " << this << " with call session " << session;
return nullptr;
}
......@@ -204,6 +206,8 @@ shared_ptr<ParticipantDevice> Conference::findParticipantDevice (const shared_pt
}
}
lInfo() << "Unable to find participant device in conference " << this << " with call session " << session;
return nullptr;
}
......
......@@ -150,7 +150,7 @@ void RemoteConferenceEventHandler::simpleNotifyReceived (const string &xmlBody)
} else {
conf->participants.remove(participant);
if (!isFullState) {
if (!isFullState && participant) {
conf->notifyParticipantRemoved(
creationTime,
isFullState,
......@@ -227,7 +227,7 @@ void RemoteConferenceEventHandler::simpleNotifyReceived (const string &xmlBody)
shared_ptr<ParticipantDevice> device = participant->findDevice(gruu);
participant->removeDevice(gruu);
if (!isFullState) {
if (!isFullState && device && participant) {
conf->notifyParticipantDeviceRemoved(
creationTime,
isFullState,
......
......@@ -89,6 +89,7 @@ shared_ptr<ParticipantDevice> Participant::findDevice (const IdentityAddress &gr
if (device->getAddress() == gruu)
return device;
}
lInfo() << "Unable to find device with address " << gruu.asString();
return nullptr;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment