summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Tox/src/tox_connection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_connection.cpp b/protocols/Tox/src/tox_connection.cpp
index 02ab9e223c..9b7c40f39d 100644
--- a/protocols/Tox/src/tox_connection.cpp
+++ b/protocols/Tox/src/tox_connection.cpp
@@ -61,6 +61,8 @@ void CToxProto::CheckConnection()
void CToxProto::OnToxCheck(void *arg, BYTE)
{
CToxProto *proto = (CToxProto*)arg;
+ if (proto->m_tox == nullptr)
+ return;
// int retriesCount = proto->getByte("MaxReconnectRetries", TOX_MAX_RECONNECT_RETRIES);
if (proto->m_iStatus < ID_STATUS_ONLINE)