diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-19 01:13:01 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:24:16 +0300 |
commit | c9e483e0fb1566d210530339d13a0e6e91260200 (patch) | |
tree | 92e35cfeef803235fdad89b69968d4b6fd64abdf /protocols/JabberG/src/jabber_ft.cpp | |
parent | af9bb538a0609893db7d5f2582595660395f0821 (diff) |
more checks for GetText()
Diffstat (limited to 'protocols/JabberG/src/jabber_ft.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index 5ba46f181e..8095a97b65 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -319,8 +319,7 @@ void CJabberProto::FtHandleSiRequest(const TiXmlElement *iqNode) if (!bIbbOnly) {
for (auto *it : TiXmlFilter(fieldNode, "option")) {
- auto *n = it->FirstChildElement("value");
- if (n != nullptr && n->GetText()) {
+ if (auto *n = it->FirstChildElement("value")) {
if (!mir_strcmp(n->GetText(), JABBER_FEAT_BYTESTREAMS)) {
optionNode = it;
ftType = FT_BYTESTREAM;
@@ -333,8 +332,7 @@ void CJabberProto::FtHandleSiRequest(const TiXmlElement *iqNode) // try IBB only if bytestreams support not found or BsOnlyIBB flag exists
if (bIbbOnly || !optionNode) {
for (auto *it : TiXmlFilter(fieldNode, "option")) {
- auto *n = it->FirstChildElement("value");
- if (n != nullptr && n->GetText()) {
+ if (auto *n = it->FirstChildElement("value")) {
if (!mir_strcmp(n->GetText(), JABBER_FEAT_IBB)) {
optionNode = it;
ftType = FT_IBB;
|