mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix crash on removing participant while creation a new chat room
This commit is contained in:
parent
39f0d9fc5c
commit
4413e7a20b
1 changed files with 2 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ void ParticipantProxyModel::add(const QString& address){
|
|||
|
||||
void ParticipantProxyModel::remove(ParticipantModel * participant){
|
||||
if(participant) {
|
||||
QString sipAddress = participant->getSipAddress();
|
||||
if( !mChatRoomModel){
|
||||
ParticipantListModel * participantsModel = dynamic_cast<ParticipantListModel*>(sourceModel());
|
||||
participantsModel->remove(participant);
|
||||
|
|
@ -105,7 +106,7 @@ void ParticipantProxyModel::remove(ParticipantModel * participant){
|
|||
mChatRoomModel->getChatRoom()->removeParticipant(participant->getParticipant());
|
||||
//dynamic_cast<ParticipantListModel*>(sourceModel())->remove(participant);
|
||||
emit countChanged();
|
||||
emit addressRemoved(participant->getSipAddress());
|
||||
emit addressRemoved(sipAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue