mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-20 19:08:30 +00:00
Fix crash on using peer address when not available
This commit is contained in:
parent
50f5ac696d
commit
2c4815460b
1 changed files with 17 additions and 3 deletions
|
|
@ -535,9 +535,23 @@ QList<QString> ChatRoomModel::getComposers(){
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ChatRoomModel::getParticipantAddress(){
|
QString ChatRoomModel::getParticipantAddress(){
|
||||||
if(!isSecure())
|
if(!isSecure()){
|
||||||
return Utils::coreStringToAppString(mChatRoom->getPeerAddress()->asString());
|
auto peerAddress = mChatRoom->getPeerAddress();
|
||||||
else{
|
if( peerAddress)
|
||||||
|
return Utils::coreStringToAppString(peerAddress->asString());
|
||||||
|
else if(isConference()){
|
||||||
|
auto conferenceAddress = mChatRoom->getConferenceAddress();
|
||||||
|
if( conferenceAddress)
|
||||||
|
return Utils::coreStringToAppString(conferenceAddress->asString());
|
||||||
|
else{
|
||||||
|
qWarning() << "ConferenceAddress is NULL when requesting it from not secure and conference ChatRoomModel :" << mChatRoom.get();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
qWarning() << "PeerAddress is NULL when requesting it from not secure ChatRoomModel :" << mChatRoom.get();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
auto participants = getParticipants();
|
auto participants = getParticipants();
|
||||||
if(participants->getCount() > 1)
|
if(participants->getCount() > 1)
|
||||||
return participants->getAt(1)->getSipAddress();
|
return participants->getAt(1)->getSipAddress();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue