Commit 14373bcb authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Prevent crash when adding a friend without entering a SIP URI.

parent 6e8e0094
...@@ -179,7 +179,7 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char ...@@ -179,7 +179,7 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char
}else if (lc->default_proxy!=NULL){ }else if (lc->default_proxy!=NULL){
/*try adding domain part from default current proxy*/ /*try adding domain part from default current proxy*/
LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc)); LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc));
if (id!=NULL){ if ((id!=NULL) && (uri[0] != '\0')){
linphone_address_set_display_name(id,NULL); linphone_address_set_display_name(id,NULL);
linphone_address_set_username(id,uri); linphone_address_set_username(id,uri);
*result=linphone_address_as_string(id); *result=linphone_address_as_string(id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment