summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-29 16:01:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-29 16:01:48 +0000
commitd19d3003fd073552d4d4481aa6f6278f65f0b043 (patch)
treeadd8794165a662b01dc7b8a4ac0faa568484ea0c /protocols/SkypeWeb
parent28ee372ded18a5754fd94ca5775cb0ec098171b6 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@13894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp16
1 files changed, 8 insertions, 8 deletions
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)