From 5ca3082957a2ca4a3beda55c0d06607ee322df01 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Feb 2019 14:10:38 +0300 Subject: and one more fix for #1854 --- protocols/JabberG/src/jabber_thread.cpp | 2 +- protocols/JabberG/src/jabber_xml.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG/src') 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; } -- cgit v1.2.3