diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp index 55f002dbd..e4f15b93d 100644 --- a/linphone-app/src/components/camera/Camera.cpp +++ b/linphone-app/src/components/camera/Camera.cpp @@ -159,7 +159,7 @@ void Camera::removeParticipantDeviceModel(){ mParticipantDeviceModel = nullptr; } -void Camera::callRemoved(){ +void Camera::removeCallModel(){ mCallModel = nullptr; } @@ -229,11 +229,13 @@ ParticipantDeviceModel * Camera::getParticipantDeviceModel() const{ void Camera::setCallModel (CallModel *callModel) { if (mCallModel != callModel) { - if( mCallModel) + if( mCallModel){ disconnect(mCallModel, &CallModel::statusChanged, this, &Camera::onCallStateChanged); + disconnect(mCallModel, &QObject::destroyed, this, &Camera::removeCallModel); + } mCallModel = callModel; connect(mCallModel, &CallModel::statusChanged, this, &Camera::onCallStateChanged); - connect(mCallModel, &QObject::destroyed, this, &Camera::callRemoved); + connect(mCallModel, &QObject::destroyed, this, &Camera::removeCallModel); updateWindowIdLocation(); update(); @@ -263,7 +265,7 @@ void Camera::setIsReady(bool status) { } void Camera::setParticipantDeviceModel(ParticipantDeviceModel * participantDeviceModel){ -if (mParticipantDeviceModel != participantDeviceModel) { + if (mParticipantDeviceModel != participantDeviceModel) { if( mParticipantDeviceModel) disconnect(mParticipantDeviceModel, &QObject::destroyed, this, &Camera::removeParticipantDeviceModel); mParticipantDeviceModel = participantDeviceModel; diff --git a/linphone-app/src/components/camera/Camera.hpp b/linphone-app/src/components/camera/Camera.hpp index 093d1ac79..afb78e4d7 100644 --- a/linphone-app/src/components/camera/Camera.hpp +++ b/linphone-app/src/components/camera/Camera.hpp @@ -94,7 +94,7 @@ private: void deactivatePreview(); void updateWindowIdLocation(); void removeParticipantDeviceModel(); - void callRemoved(); + void removeCallModel(); QVariantMap mLastVideoDefinition; QTimer mLastVideoDefinitionChecker;