summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_options.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-05-07 17:14:12 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-05-07 17:14:12 +0000
commit9fa85abf24cda9681cbe3ceb1cdb2da50ca05644 (patch)
treefc152026608e88b81577b18c33e750c2fa9bd0a9 /protocols/SkypeWeb/src/skype_options.cpp
parent4322e60a76440683afc694c1df0f2ccc8de726c3 (diff)
SkypeWeb: Leaks fix (thx wishmaster)
git-svn-id: http://svn.miranda-ng.org/main/trunk@13477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_options.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index c39c3bc0ee..882b35cfe7 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -47,10 +47,12 @@ void CSkypeOptionsMain::OnInitDialog()
void CSkypeOptionsMain::OnApply()
{
- if (mir_strcmpi(ptrA(m_proto->getStringA(SKYPE_SETTINGS_ID)), ptrA(m_skypename.GetTextA())) || mir_strcmpi(ptrA(m_proto->getStringA("Password")), ptrA(m_password.GetTextA())))
+ ptrA tszNewSkypename(m_skypename.GetTextA()),tszNewPassword(m_password.GetTextA()),
+ tszOldSkypename(m_proto->getStringA(SKYPE_SETTINGS_ID)),tszOldPassword(m_proto->getStringA("Password"));
+ if (mir_strcmpi(tszNewSkypename, tszOldSkypename) || mir_strcmpi(tszNewPassword, tszOldPassword))
m_proto->delSetting("TokenExpiresIn");
- m_proto->setString(SKYPE_SETTINGS_ID, m_skypename.GetTextA());
- m_proto->setString("Password", m_password.GetTextA());
+ m_proto->setString(SKYPE_SETTINGS_ID, tszNewSkypename);
+ m_proto->setString("Password", tszNewPassword);
ptrT group(m_group.GetText());
if (mir_tstrlen(group) > 0 && !Clist_GroupExists(group))
Clist_CreateGroup(0, group);