Crash on chat rooms with the default account.

This commit is contained in:
Julien Wadel 2023-03-07 10:44:17 +01:00
parent 5a49cbcc35
commit b13e88b523
2 changed files with 22 additions and 11 deletions

View file

@ -11,9 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- File viewer in chats (Image/Animated Image/Video/Texts) with the option to export the file.
- Accept/decline CLI commands.
## 5.0.13 - undefined
### Fixed
- Crash on chat rooms with default account.
## 5.0.12 - 2023-03-01
## Fixed
### Fixed
- Some case of unwanted settings folders creation.
- Replace black thumbnails that contains transparency by white color.
- Unusable Contact sheet.

View file

@ -87,11 +87,14 @@ ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){
mConferenceInfo->setDateTime(0);
mConferenceInfo->setDuration(0);
mIsScheduled = false;
auto accountAddress = CoreManager::getInstance()->getCore()->getDefaultAccount()->getContactAddress();
if(accountAddress){
auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean();
mConferenceInfo->setOrganizer(cleanedClonedAddress);
auto defaultAccount = CoreManager::getInstance()->getCore()->getDefaultAccount();
if(defaultAccount){
auto accountAddress = defaultAccount->getContactAddress();
if(accountAddress){
auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean();
mConferenceInfo->setOrganizer(cleanedClonedAddress);
}
}
connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::timeZoneModelChanged);
connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::dateTimeChanged);
@ -324,11 +327,14 @@ void ConferenceInfoModel::resetConferenceInfo() {
mConferenceInfo->setDateTime(0);
mConferenceInfo->setDuration(0);
mIsScheduled = false;
auto accountAddress = CoreManager::getInstance()->getCore()->getDefaultAccount()->getContactAddress();
if(accountAddress){
auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean();
mConferenceInfo->setOrganizer(cleanedClonedAddress);
auto defaultAccount = CoreManager::getInstance()->getCore()->getDefaultAccount();
if(defaultAccount){
auto accountAddress = defaultAccount->getContactAddress();
if(accountAddress){
auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean();
mConferenceInfo->setOrganizer(cleanedClonedAddress);
}
}
}