summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_rc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_rc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_rc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp
index 26e3b801b4..272f5b7c06 100644
--- a/protocols/JabberG/src/jabber_rc.cpp
+++ b/protocols/JabberG/src/jabber_rc.cpp
@@ -341,10 +341,11 @@ int CJabberProto::AdhocSetStatusHandler(const TiXmlElement*, CJabberIqInfo *pInf
if (!fieldNode)
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
- const char *pszValue = fieldNode->FirstChildElement("value")->GetText();
- if (pszValue == nullptr)
+ auto *nodeValue = fieldNode->FirstChildElement("value");
+ if (nodeValue == nullptr)
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
+ const char *pszValue = nodeValue->GetText();
int status;
if (!mir_strcmp(pszValue, "away")) status = ID_STATUS_AWAY;
else if (!mir_strcmp(pszValue, "xa")) status = ID_STATUS_NA;