forked from mirrors/linphone-iphone
Fix crash : national_significant number can be NULL
This commit is contained in:
parent
55dd071043
commit
da2945e6fa
1 changed files with 10 additions and 6 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue