summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-26 13:55:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-26 13:55:31 +0300
commit59f72fa52bd560003af3c4635f92a885d1c07dbc (patch)
treea574aa7c8115bda94252bbd0587cf1158b49e1b3 /protocols/JabberG/src/jabber_misc.cpp
parent1bf0fece31876c453bea93479e6d0d40bd8a564d (diff)
XmlFirstChild / XmlGetAttr - safe wrappers for tinyxml2
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_misc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 1ebda3ebf6..57c1fa9dfd 100755
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -449,10 +449,10 @@ CMStringA CJabberProto::ExtractImage(const TiXmlElement *node)
const char *src;
CMStringA link;
- if ((nHtml = node->FirstChildElement("html")) != nullptr &&
- (nBody = nHtml->FirstChildElement("body")) != nullptr &&
- (nImg = nBody->FirstChildElement("img")) != nullptr &&
- (src = nImg->Attribute("src")) != nullptr) {
+ if ((nHtml = XmlFirstChild(node, "html")) != nullptr &&
+ (nBody = XmlFirstChild(nHtml, "body")) != nullptr &&
+ (nImg = XmlFirstChild(nBody, "img")) != nullptr &&
+ (src = XmlGetAttr(nImg, "src")) != nullptr) {
CMStringA strSrc(src);
if (strSrc.Left(11).Compare("data:image/") == 0) {