summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_caps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_caps.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index d8ed2b6a35..508b7126c1 100755
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -169,6 +169,9 @@ void CJabberProto::OnIqResultCapsDiscoInfo(const TiXmlElement*, CJabberIqInfo *p
JSONNode root;
for (auto *field : TiXmlFilter(xform, "field")) {
const char *fieldName = XmlGetAttr(field, "var"), *fieldValue = XmlGetChildText(field, "value");
+ if (fieldValue == nullptr)
+ continue;
+
if (!mir_strcmp(fieldName, "os"))
root.push_back(JSONNode("o", pCaps->m_szOs = mir_strdup(fieldValue)));
else if (!mir_strcmp(fieldName, "os_version"))