summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-09-21 19:06:14 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-09-21 19:06:14 +0000
commit06ca08ab518ba90cc82db8cc9ac27b5a25340510 (patch)
treefb53c39091f9106431605da5af92fab710b74242 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
parenta8af09a3f64f5cb1b7417977ed8265b5a97e4107 (diff)
WhatsApp:
- Request password with Voice (patch by Cassio) - minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
index 524bb80f2a..e6640b0156 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
@@ -875,7 +875,15 @@ void WAConnection::processUploadResponse(ProtocolTreeNode * node, FMessage * mes
fileName = tempfileName.substr(index);
}
else {
- string json = MediaUploader::pushfile(node->getChild("media")->getAttributeValue("url"),message, this->user);
+ ProtocolTreeNode *media = node->getChild("media");
+ if (media == NULL)
+ return;
+
+ string url = media->getAttributeValue("url");
+ if(url.empty())
+ return;
+
+ string json = MediaUploader::pushfile(url,message, this->user);
if (json.empty())
return;