From 4dc206f3eb128a96228e5ec3cce594f147bf7b7a Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 25 Jun 2015 07:21:14 +0000 Subject: SkypeWeb: crashfix git-svn-id: http://svn.miranda-ng.org/main/trunk@14371 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_messages.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index baf3d242c3..6964784fde 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -93,11 +93,11 @@ void CSkypeProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg) if (response == NULL || (response->resultCode != 200 && response->resultCode != 201)) { std::string error("Unknown error"); - if (response) + if (response->pData != NULL) { JSONNode root = JSONNode::parse(response->pData); const JSONNode &node = root["errorCode"]; - error = node.as_string(); + error = node.isnull() ? "" : node.as_string(); } ptrT username(getTStringA(hContact, "Skypename")); debugLogA(__FUNCTION__": failed to send message for %s (%s)", username, error.c_str()); -- cgit v1.2.3