mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix potential crash, and hide the account link menu if there is no account
This commit is contained in:
parent
ccbf220270
commit
b6aefc2de9
2 changed files with 3 additions and 2 deletions
|
|
@ -68,7 +68,7 @@
|
|||
assistant_activate_phone_number_link);
|
||||
|
||||
LinphoneAccount *acc = linphone_core_get_default_account(LC);
|
||||
LinphoneAccountParams const *accParams = linphone_account_get_params(acc);
|
||||
LinphoneAccountParams const *accParams = (acc) ? linphone_account_get_params(acc) : NULL;
|
||||
if (acc &&
|
||||
strcmp([LinphoneManager.instance lpConfigStringForKey:@"domain_name"
|
||||
inSection:@"app"
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@
|
|||
changeCurrentView:AssistantView.compositeViewDescription];
|
||||
}]];
|
||||
BOOL mustLink = ([LinphoneManager.instance lpConfigIntForKey:@"must_link_account_time"] > 0);
|
||||
if (mustLink) {
|
||||
BOOL hasAccount = linphone_core_get_account_list(LC) != NULL;
|
||||
if (mustLink && hasAccount) {
|
||||
[_sideMenuEntries
|
||||
addObject:[[SideMenuEntry alloc] initWithTitle:NSLocalizedString(@"Link my account", nil)
|
||||
image:[UIImage imageNamed:@"menu_link_account.png"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue