From d19d3003fd073552d4d4481aa6f6278f65f0b043 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 May 2015 16:01:48 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@13894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_poll_processing.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 6a349a7bc1..cfb1d1dc69 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -21,11 +21,11 @@ void CSkypeProto::ProcessEndpointPresenceRes(const JSONNode &node) { debugLogA("CSkypeProto::ProcessEndpointPresenceRes"); std::string selfLink = node["selfLink"].as_string(); - std::string skypename(ContactUrlToName(selfLink.c_str())); - if (skypename.empty()) + ptrA skypename(ContactUrlToName(selfLink.c_str())); + if (skypename == NULL) return; - MCONTACT hContact = FindContact(skypename.c_str()); + MCONTACT hContact = FindContact(skypename); if (hContact == NULL) return; @@ -106,7 +106,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) std::string selfLink = node["selfLink"].as_string(); std::string status = node["status"].as_string(); - std::string skypename; + ptrA skypename; if (selfLink.find("/8:") != std::string::npos) { @@ -117,9 +117,9 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) skypename = SelfUrlToName(selfLink.c_str()); } - if (!skypename.empty()) + if (skypename != NULL) { - if (IsMe(skypename.c_str())) + if (IsMe(skypename)) { int iNewStatus = SkypeToMirandaStatus(status.c_str()); int old_status = m_iStatus; @@ -131,7 +131,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) } else { - MCONTACT hContact = FindContact(skypename.c_str()); + MCONTACT hContact = FindContact(skypename); if (hContact != NULL) SetContactStatus(hContact, SkypeToMirandaStatus(status.c_str())); } @@ -160,7 +160,7 @@ void CSkypeProto::ProcessConversationUpdateRes(const JSONNode&) if (strstr(convLink, "/8:") && IsMe(ContactUrlToName(fromLink))) { - std::string skypename(ContactUrlToName(convLink)); + ptrA skypename(ContactUrlToName(convLink)); MCONTACT hContact = FindContact(skypename); if (hContact != NULL) -- cgit v1.2.3