diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-20 14:10:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-20 14:10:38 +0300 |
commit | 5ca3082957a2ca4a3beda55c0d06607ee322df01 (patch) | |
tree | 950d0759f0445e3d1cca40e3cfad45d01bd5b60c | |
parent | e8ae74d22d71d5d32e6384c95f3ffedcc840b31d (diff) |
and one more fix for #1854
-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;
}
|