Commit 117c833d authored by jehan's avatar jehan
Browse files

fix crash when proxy config done is call first

parent f3cfd4e0
......@@ -275,13 +275,13 @@ int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route)
bool_t linphone_proxy_config_check(LinphoneCore *lc, LinphoneProxyConfig *obj){
if (obj->reg_proxy==NULL){
if (lc->vtable.display_warning)
if (lc && lc->vtable.display_warning)
lc->vtable.display_warning(lc,_("The sip proxy address you entered is invalid, it must start with \"sip:\""
" followed by a hostname."));
return FALSE;
}
if (obj->reg_identity==NULL){
if (lc->vtable.display_warning)
if (lc && lc->vtable.display_warning)
lc->vtable.display_warning(lc,_("The sip identity you entered is invalid.\nIt should look like "
"sip:username@proxydomain, such as sip:alice@example.net"));
return FALSE;
......
......@@ -127,6 +127,8 @@ void linphone_proxy_config_address_equal_test() {
void linphone_proxy_config_is_server_config_changed_test() {
LinphoneProxyConfig* proxy_config = linphone_proxy_config_new();
linphone_proxy_config_done(proxy_config); /*test done without edit*/
linphone_proxy_config_set_identity(proxy_config,"sip:toto@titi");
linphone_proxy_config_edit(proxy_config);
linphone_proxy_config_set_identity(proxy_config,"sips:toto@titi");
......
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