From 327f5e91239eb9771d5288bf5008a96c5a82c4b3 Mon Sep 17 00:00:00 2001 From: gaelle Date: Tue, 11 Mar 2025 10:52:47 +0100 Subject: [PATCH] fix crash (ParticipantDeviceCore with nullptr model can be created if active speaker becomes null) --- Linphone/core/participant/ParticipantDeviceCore.cpp | 2 +- Linphone/model/conference/ConferenceModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Linphone/core/participant/ParticipantDeviceCore.cpp b/Linphone/core/participant/ParticipantDeviceCore.cpp index 433a9231..6a630131 100644 --- a/Linphone/core/participant/ParticipantDeviceCore.cpp +++ b/Linphone/core/participant/ParticipantDeviceCore.cpp @@ -68,7 +68,7 @@ ParticipantDeviceCore::ParticipantDeviceCore(const std::shared_ptrremoveListener(); + if (mParticipantDeviceModel) mParticipantDeviceModel->removeListener(); } void ParticipantDeviceCore::setSelf(QSharedPointer me) { diff --git a/Linphone/model/conference/ConferenceModel.cpp b/Linphone/model/conference/ConferenceModel.cpp index 82701edd..9f986c85 100644 --- a/Linphone/model/conference/ConferenceModel.cpp +++ b/Linphone/model/conference/ConferenceModel.cpp @@ -171,7 +171,7 @@ bool ConferenceModel::isScreenSharingEnabled() const { void ConferenceModel::onActiveSpeakerParticipantDevice( const std::shared_ptr &conference, const std::shared_ptr &participantDevice) { - lDebug() << "onActiveSpeakerParticipantDevice: " << participantDevice->getAddress()->asString().c_str(); + lDebug() << "onActiveSpeakerParticipantDevice: " << (participantDevice ? participantDevice->getAddress()->asString().c_str() : "NULL"); emit activeSpeakerParticipantDevice(conference, conference->getActiveSpeakerParticipantDevice()); }