--- coreapi/linphonecore.c 2013-06-06 09:13:34.498066251 +0200 +++ coreapi/linphonecore.c_new 2013-06-06 09:49:05.226003295 +0200 @@ -2314,7 +2314,8 @@ /*always prefer the default proxy if it is matching the destination uri*/ if (default_cfg){ const char *domain=linphone_proxy_config_get_domain(default_cfg); - if (strcmp(domain,linphone_address_get_domain(uri))==0) + const char *uri_domain=linphone_address_get_domain(uri); + if (uri_domain != NULL && strcmp(domain,uri_domain)==0) return default_cfg; } @@ -2322,7 +2323,8 @@ for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=elem->next){ LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data; const char *domain=linphone_proxy_config_get_domain(cfg); - if (domain!=NULL && strcmp(domain,linphone_address_get_domain(uri))==0){ + const char *uri_domain=linphone_address_get_domain(uri); + if (domain!=NULL && uri_domain!=NULL && strcmp(domain,uri_domain)==0){ found_cfg=cfg; break; }