summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_xml.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-19 01:13:01 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-19 19:24:16 +0300
commitc9e483e0fb1566d210530339d13a0e6e91260200 (patch)
tree92e35cfeef803235fdad89b69968d4b6fd64abdf /protocols/JabberG/src/jabber_xml.h
parentaf9bb538a0609893db7d5f2582595660395f0821 (diff)
more checks for GetText()
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.h')
-rw-r--r--protocols/JabberG/src/jabber_xml.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h
index b1ee52586f..c194307efd 100644
--- a/protocols/JabberG/src/jabber_xml.h
+++ b/protocols/JabberG/src/jabber_xml.h
@@ -138,7 +138,7 @@ struct XATTRID
__forceinline TiXmlElement *operator<<(TiXmlElement *node, const XATTRID& attr)
{
- node->SetAttribute("id", attr.id);
+ XmlAddAttrID(node, attr.id);
return node;
}
@@ -224,7 +224,7 @@ public:
{
case T_ATTRIBUTE: return m_hXml->Attribute(m_szParam);
case T_NODE: return m_hXml->GetText();
- case T_NODESET: return m_hXml->FirstChildElement()->GetText();
+ case T_NODESET: return (m_hXml->FirstChildElement()) ? m_hXml->FirstChildElement()->GetText() : 0;
}
return nullptr;
}