Crash on ending call in conference.

This commit is contained in:
Julien Wadel 2023-02-07 14:40:16 +01:00
parent bd6290cd19
commit 356302ea61
3 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -573,7 +573,7 @@ void CallsListModel::handleCallStatusChanged () {
void CallsListModel::addCall (const shared_ptr<linphone::Call> &call) {
int index = findCallIndex(mList, call);
if( index < 0){
QSharedPointer<CallModel> callModel = QSharedPointer<CallModel>::create(call);
QSharedPointer<CallModel> callModel = QSharedPointer<CallModel>(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> callModel = QSharedPointer<CallModel>::create(nullptr);
QSharedPointer<CallModel> callModel = QSharedPointer<CallModel>(new CallModel(nullptr), &QObject::deleteLater);
qInfo() << QStringLiteral("Add call:") << callModel->getFullLocalAddress() << callModel->getFullPeerAddress();
App::getInstance()->getEngine()->setObjectOwnership(callModel.get(), QQmlEngine::CppOwnership);

View file

@ -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;
}