From ef08adee42f1b456f441d6cbf24dacd79bf93d1b Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 14 Jun 2019 11:38:33 +0200 Subject: [PATCH] fix crash because of wrong domain --- Classes/AssistantView.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index c61b3792b..43ca19e0c 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -1347,6 +1347,11 @@ void assistant_is_account_linked(LinphoneAccountCreator *creator, LinphoneAccoun LinphoneProxyConfig *config = linphone_core_create_proxy_config(LC); LinphoneAddress *addr = linphone_address_new(NULL); LinphoneAddress *tmpAddr = linphone_address_new([NSString stringWithFormat:@"sip:%@",domain].UTF8String); + if (tmpAddr == nil) { + [self displayAssistantConfigurationError]; + return; + } + linphone_address_set_username(addr, username.UTF8String); linphone_address_set_port(addr, linphone_address_get_port(tmpAddr)); linphone_address_set_domain(addr, linphone_address_get_domain(tmpAddr));