summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_options.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-09-14 19:34:42 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-09-14 19:34:42 +0000
commitdda141f0798b79cfa71e78934ed1b968fcc20f53 (patch)
tree327942389d763f66201e47d49ad3253e0c0fe1d1 /protocols/Tox/src/tox_options.cpp
parent98a324d2fb4babc09e94a10fef819f3409477eb2 (diff)
Tox: fixed tox thread management
git-svn-id: http://svn.miranda-ng.org/main/trunk@15354 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r--protocols/Tox/src/tox_options.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index a547cb3871..9d9cebee7b 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -62,7 +62,7 @@ void CToxOptionsMain::ToxAddressCopy_OnClick(CCtrlButton*)
void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*)
{
- ToxThreadData toxThread;
+ CToxThread toxThread;
ptrT profilePath(m_proto->GetToxProfilePath());
if (!m_proto->IsFileExists(profilePath))
@@ -91,7 +91,8 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*)
Clist_CreateGroup(0, group);
m_proto->LoadFriendList(NULL);
- m_proto->UninitToxCore(&toxThread);
+ m_proto->SaveToxProfile();
+ tox_kill(toxThread.tox);
m_toxAddress.Enable();
m_toxAddress.SetTextA(ptrA(m_proto->getStringA(TOX_SETTINGS_ID)));