Commit 60eff70b authored by Andrea Gianarda's avatar Andrea Gianarda
Browse files

Fix crash if local buffer is empty

parent de81fe52
......@@ -1476,9 +1476,11 @@ static int create_friend(void *data, int argc, char **argv, char **colName) {
unsigned int storage_id = (unsigned int)atoi(argv[0]);
//sqlite3_exec return a Locale string and Belcard need to be in UTF8 for parsing
if (argv[6]) {
string localeBuffer(argv[6]);
string utf8Buffer = LinphonePrivate::Utils::localeToUtf8(localeBuffer);
vcard = linphone_vcard_context_get_vcard_from_buffer(context, utf8Buffer.c_str());
}
if (vcard) {
linphone_vcard_set_etag(vcard, argv[7]);
......
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