From 576030d612602fc7144935bfbc953df513ec8bab Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Mon, 19 Aug 2019 10:22:56 +0200 Subject: [PATCH] fix crash at startup --- Classes/ChatConversationCreateTableView.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/ChatConversationCreateTableView.m b/Classes/ChatConversationCreateTableView.m index 49701a422..818094e14 100644 --- a/Classes/ChatConversationCreateTableView.m +++ b/Classes/ChatConversationCreateTableView.m @@ -98,6 +98,11 @@ LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(LC); if (cfg) { const char *normalizedPhoneNumber = linphone_proxy_config_normalize_phone_number(cfg, phoneNumber); + if (!normalizedPhoneNumber) { + // get invalid phone number, continue + results = results->next; + continue; + } addr = linphone_proxy_config_normalize_sip_uri(cfg, normalizedPhoneNumber); uri = linphone_address_as_string_uri_only(addr); address = [NSString stringWithUTF8String:uri];