From 7ce40f5b4dbb107a8bd703de1be54b60d57fdcb4 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Fri, 11 Oct 2024 07:11:26 +0200 Subject: [PATCH] Fix crash when no proxy is provided --- Classes/LinphoneCoreSettingsStore.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 13e28207c..8ba38dca4 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -681,11 +681,11 @@ goto bad_proxy; } // use proxy as route if outbound_proxy is enabled - if (linphone_account_params_set_server_address(newAccountParams, proxy_addr) == -1) { + if (proxy_addr && linphone_account_params_set_server_address(newAccountParams, proxy_addr) == -1) { error = NSLocalizedString(@"Invalid proxy address", nil); goto bad_proxy; } - if (linphone_account_params_set_routes_addresses(newAccountParams, isOutboundProxy ? bctbx_list_new((void*)proxy_addr) : NULL) == -1) { + if (proxy_addr && linphone_account_params_set_routes_addresses(newAccountParams, isOutboundProxy ? bctbx_list_new((void*)proxy_addr) : NULL) == -1) { error = NSLocalizedString(@"Invalid route", nil); goto bad_proxy; }