fix crash (ParticipantDeviceCore with nullptr model can be created if active speaker becomes null)
This commit is contained in:
parent
8f6a448b1d
commit
327f5e9123
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ ParticipantDeviceCore::ParticipantDeviceCore(const std::shared_ptr<linphone::Par
|
|||
}
|
||||
|
||||
ParticipantDeviceCore::~ParticipantDeviceCore() {
|
||||
mParticipantDeviceModel->removeListener();
|
||||
if (mParticipantDeviceModel) mParticipantDeviceModel->removeListener();
|
||||
}
|
||||
|
||||
void ParticipantDeviceCore::setSelf(QSharedPointer<ParticipantDeviceCore> me) {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ bool ConferenceModel::isScreenSharingEnabled() const {
|
|||
void ConferenceModel::onActiveSpeakerParticipantDevice(
|
||||
const std::shared_ptr<linphone::Conference> &conference,
|
||||
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
|
||||
lDebug() << "onActiveSpeakerParticipantDevice: " << participantDevice->getAddress()->asString().c_str();
|
||||
lDebug() << "onActiveSpeakerParticipantDevice: " << (participantDevice ? participantDevice->getAddress()->asString().c_str() : "NULL");
|
||||
|
||||
emit activeSpeakerParticipantDevice(conference, conference->getActiveSpeakerParticipantDevice());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue