diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index 8787e3327..a15b88b13 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -873,10 +873,12 @@ static UICompositeViewDescription *compositeDescription = nil; UIView *usernameView = [self findView:ViewElement_UsernameFormView inView:self.contentView ofType:UIView.class]; usernameView.hidden = !usernameSwitch.isOn; - ((UITextField *)[self findView:ViewElement_Phone - inView:_linphoneLoginView - ofType:[UIAssistantTextField class]]) - .text = [NSString stringWithUTF8String:nationnal_significant_number]; + if (nationnal_significant_number) { + ((UITextField *)[self findView:ViewElement_Phone + inView:_linphoneLoginView + ofType:[UIAssistantTextField class]]) + .text = [NSString stringWithUTF8String:nationnal_significant_number]; + } ((UITextField *)[self findView:ViewElement_SMSCode inView:_createAccountActivateSMSView ofType:[UITextField class]]) @@ -886,8 +888,10 @@ static UICompositeViewDescription *compositeDescription = nil; [CountryListView countryWithIso:[NSString stringWithUTF8String:dialplan.iso_country_code]]; [self didSelectCountry:country]; // Reset phone number in account_creator to be sure to let the user retry - linphone_account_creator_set_phone_number(account_creator, nationnal_significant_number, - dialplan.ccc); + if (nationnal_significant_number) { + linphone_account_creator_set_phone_number(account_creator, nationnal_significant_number, + dialplan.ccc); + } }]; defaultAction.accessibilityLabel = @"PopUpResp";