diff --git a/Classes/AssistantLinkView.m b/Classes/AssistantLinkView.m index 44c0cf120..d637d5c90 100644 --- a/Classes/AssistantLinkView.m +++ b/Classes/AssistantLinkView.m @@ -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" diff --git a/Classes/SideMenuTableView.m b/Classes/SideMenuTableView.m index 67763511d..67ca16831 100644 --- a/Classes/SideMenuTableView.m +++ b/Classes/SideMenuTableView.m @@ -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"]