From cb2e2c8ca4aad1eed117d233d5d0468670697d54 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 7 Mar 2017 10:18:08 +0100 Subject: [PATCH] Fix crash : verify dialplan.iso_country_code exists --- Classes/AssistantView.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index a15b88b13..286f4cec8 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -884,9 +884,11 @@ static UICompositeViewDescription *compositeDescription = nil; ofType:[UITextField class]]) .text = @""; linphone_account_creator_set_activation_code(account_creator, ""); - NSDictionary *country = - [CountryListView countryWithIso:[NSString stringWithUTF8String:dialplan.iso_country_code]]; - [self didSelectCountry:country]; + if (dialplan.iso_country_code) { + NSDictionary *country = [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 if (nationnal_significant_number) { linphone_account_creator_set_phone_number(account_creator, nationnal_significant_number,