Commit 5a7d0a07 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Attempt to fix __stack_chk_fail crash on MacOSX

parent 5c0bdf95
......@@ -494,8 +494,17 @@ void linphone_carddav_put_vcard(LinphoneCardDavContext *cdc, LinphoneFriend *lf)
if (!linphone_vcard_get_url(lvc)) {
char *url = generate_url_from_server_address_and_uid(cdc->friend_list->uri);
linphone_vcard_set_url(lvc, url);
ms_free(url);
if (url) {
linphone_vcard_set_url(lvc, url);
ms_free(url);
} else {
const char *msg = "vCard doesn't have an URL, and friendlist doesn't have a CardDAV server set either, can't push it";
ms_warning(msg);
if (cdc && cdc->sync_done_cb) {
cdc->sync_done_cb(cdc, FALSE, msg);
}
return;
}
}
query = linphone_carddav_create_put_query(cdc, lvc);
......@@ -505,8 +514,10 @@ void linphone_carddav_put_vcard(LinphoneCardDavContext *cdc, LinphoneFriend *lf)
const char *msg = NULL;
if (!lvc) {
msg = "LinphoneVCard is NULL";
} else if (!linphone_vcard_get_url(lvc)) {
} else if (!linphone_vcard_get_uid(lvc)) {
msg = "LinphoneVCard doesn't have an UID";
} else {
msg = "Unknown error";
}
if (msg) {
......
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