From 8429513ae275d2e10d9c991b810720830a127e06 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Mon, 20 Apr 2015 08:15:27 +0000 Subject: SkypeWeb: Crash fix. git-svn-id: http://svn.miranda-ng.org/main/trunk@12956 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_history_sync.cpp | 4 ++-- protocols/SkypeWeb/src/skype_messages.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 2bd1b2fa7c..df5d4044a7 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -100,7 +100,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) //content=user name MCONTACT hContact = FindContact(ptrA(ContactUrlToName(conversationLink))); ptrA name; - int iType, iDuration; + int iType = 3, iDuration = 0; ptrA skypename(ContactUrlToName(from)); bool isMe = IsMe(skypename); int flags = DBEF_UTF | DBEF_READ; @@ -117,7 +117,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) HXML xmlNode = xi.getChildByPath(xml, _T("part"), 0); HXML duration = xmlNode == NULL ? NULL : xi.getChildByPath(xmlNode, _T("duration"), 0); - iDuration = xmlNode != NULL ? atoi(mir_t2a(xi.getText(xmlNode))) : NULL; + iDuration = duration != NULL ? atoi(mir_t2a(xi.getText(duration))) : NULL; xi.destroyNode(xml); } diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index ed0520465e..33d0944ad7 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -276,7 +276,7 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node) HXML xmlNode = xi.getChildByPath(xml, _T("part"), 0); HXML duration = xmlNode == NULL ? NULL : xi.getChildByPath(xmlNode, _T("duration"), 0); - iDuration = xmlNode != NULL ? atoi(mir_t2a(xi.getText(xmlNode))) : NULL; + iDuration = duration != NULL ? atoi(mir_t2a(xi.getText(duration))) : NULL; xi.destroyNode(xml); } -- cgit v1.2.3