diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce0d4e93..30803980e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Display of non-Ascii avatar +- Crash on ending call in conference. ## 5.0.10 - 2023-02-02 diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index 1d9a9e1c8..3ba0ea8d7 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -573,7 +573,7 @@ void CallsListModel::handleCallStatusChanged () { void CallsListModel::addCall (const shared_ptr &call) { int index = findCallIndex(mList, call); if( index < 0){ - QSharedPointer callModel = QSharedPointer::create(call); + QSharedPointer callModel = QSharedPointer(new CallModel(call), &QObject::deleteLater); qInfo() << QStringLiteral("Add call:") << callModel->getFullLocalAddress() << callModel->getFullPeerAddress(); App::getInstance()->getEngine()->setObjectOwnership(callModel.get(), QQmlEngine::CppOwnership); @@ -603,7 +603,7 @@ void CallsListModel::addDummyCall () { App::smartShowWindow(callsWindow); } - QSharedPointer callModel = QSharedPointer::create(nullptr); + QSharedPointer callModel = QSharedPointer(new CallModel(nullptr), &QObject::deleteLater); qInfo() << QStringLiteral("Add call:") << callModel->getFullLocalAddress() << callModel->getFullPeerAddress(); App::getInstance()->getEngine()->setObjectOwnership(callModel.get(), QQmlEngine::CppOwnership); diff --git a/linphone-app/src/components/camera/Camera.cpp b/linphone-app/src/components/camera/Camera.cpp index 31ab63864..8c4e879ac 100644 --- a/linphone-app/src/components/camera/Camera.cpp +++ b/linphone-app/src/components/camera/Camera.cpp @@ -167,6 +167,10 @@ void Camera::removeParticipantDeviceModel(){ } void Camera::removeCallModel(){ + if( mCallModel){ + disconnect(mCallModel, &CallModel::statusChanged, this, &Camera::onCallStateChanged); + disconnect(mCallModel, &QObject::destroyed, this, &Camera::removeCallModel); + } mCallModel = nullptr; }