summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Tox/src/tox_core.cpp3
-rw-r--r--protocols/Tox/src/tox_network.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp
index a2da0b3e85..bcd8ade298 100644
--- a/protocols/Tox/src/tox_core.cpp
+++ b/protocols/Tox/src/tox_core.cpp
@@ -124,6 +124,7 @@ void CToxProto::UninitToxCore()
SaveToxProfile();
tox_kill(toxThread->tox);
- this->toxThread = NULL;
}
+
+ toxThread = NULL;
} \ No newline at end of file
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp
index 9520672494..e87981ef40 100644
--- a/protocols/Tox/src/tox_network.cpp
+++ b/protocols/Tox/src/tox_network.cpp
@@ -150,6 +150,7 @@ void CToxProto::PollingThread(void*)
if (!InitToxCore())
{
+ UninitToxCore();
SetStatus(ID_STATUS_OFFLINE);
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
logger->Log(__FUNCTION__": leaving");