summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_profile.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-16 18:32:24 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-16 18:32:24 +0000
commit37edb76041ddaf7a500add3e49108a3106db43a8 (patch)
tree9850ad6aa3c0f73c00d8dac987899b36c6e693e6 /protocols/Tox/src/tox_profile.cpp
parent5c365012d42bd08fce526394372d396caa6ea04c (diff)
Tox:
- Fixed memory leaks git-svn-id: http://svn.miranda-ng.org/main/trunk@12869 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_profile.cpp')
-rw-r--r--protocols/Tox/src/tox_profile.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index afbf5f577e..2a22f24f90 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -154,11 +154,12 @@ CToxPasswordEditor::CToxPasswordEditor(CToxProto *proto) :
void CToxPasswordEditor::OnOk(CCtrlButton*)
{
+ ptrT tszPassword(password.GetText());
if (savePermanently.Enabled())
- m_proto->setTString("Password", password.GetText());
+ m_proto->setTString("Password", tszPassword);
if (m_proto->password != NULL)
mir_free(m_proto->password);
- m_proto->password = mir_utf8encodeW(password.GetText());
+ m_proto->password = mir_utf8encodeW(tszPassword);
EndDialog(m_hwnd, 1);
}