Skip to content
Snippets Groups Projects
Commit a767690f authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Sébastien Blin
Browse files

misc: crash fix for calladapter when there is no account

Change-Id: I6432c6ebb7776bb0968846c661bd98ed78cde2bb
parent f09b9a08
Branches
Tags
No related merge requests found
...@@ -35,7 +35,8 @@ CallAdapter::CallAdapter(SystemTray* systemTray, LRCInstance* instance, QObject* ...@@ -35,7 +35,8 @@ CallAdapter::CallAdapter(SystemTray* systemTray, LRCInstance* instance, QObject*
, systemTray_(systemTray) , systemTray_(systemTray)
{ {
accountId_ = lrcInstance_->getCurrAccId(); accountId_ = lrcInstance_->getCurrAccId();
connectCallModel(accountId_); if (!accountId_.isEmpty())
connectCallModel(accountId_);
connect(&lrcInstance_->behaviorController(), connect(&lrcInstance_->behaviorController(),
&BehaviorController::showIncomingCallView, &BehaviorController::showIncomingCallView,
...@@ -518,13 +519,13 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo) ...@@ -518,13 +519,13 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
: accInfo.contactModel->bestNameForContact(convInfo.participants[0]); : accInfo.contactModel->bestNameForContact(convInfo.participants[0]);
Q_EMIT updateOverlay(isPaused, Q_EMIT updateOverlay(isPaused,
isAudioOnly, isAudioOnly,
isAudioMuted, isAudioMuted,
isVideoMuted, isVideoMuted,
isRecording, isRecording,
accInfo.profileInfo.type == lrc::api::profile::Type::SIP, accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
!convInfo.confId.isEmpty(), !convInfo.confId.isEmpty(),
bestName); bestName);
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment