diff options
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_xml.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 31e1330e60..ada674d96c 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -2056,7 +2056,7 @@ int ThreadData::send(char* buf, int bufsize) // Caution: DO NOT use ->send() to send binary (non-string) data
int ThreadData::send(TiXmlElement *node)
{
- if (this == nullptr)
+ if (this == nullptr || node == nullptr)
return 0;
while (auto *parent = node->Parent()) {
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index 69bff6c7e1..84be255ba5 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -85,7 +85,7 @@ struct XATTR __forceinline TiXmlElement *operator<<(TiXmlElement *node, const XATTR& attr)
{
- node->SetAttribute(attr.name, attr.value);
+ XmlAddAttr(node, attr.name, attr.value);
return node;
}
|