mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Fix possible crash when generating presence xml.
This commit is contained in:
parent
adef4bdb12
commit
2cbe71c569
1 changed files with 5 additions and 2 deletions
|
|
@ -1528,8 +1528,11 @@ static int write_xml_presence_service(xmlTextWriterPtr writer, LinphonePresenceS
|
|||
err = xmlTextWriterWriteAttribute(writer, (const xmlChar *)"priority", (const xmlChar *)"0.8");
|
||||
}
|
||||
if (err >= 0) {
|
||||
const char *contact_str = service->contact;
|
||||
if (contact_str == NULL) contact_str = contact;
|
||||
const char *contact_str;
|
||||
if ((service == NULL) || (service->contact == NULL))
|
||||
contact_str = contact;
|
||||
else
|
||||
contact_str = service->contact;
|
||||
err = xmlTextWriterWriteString(writer, (const xmlChar *)contact_str);
|
||||
}
|
||||
if (err >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue