From 003b1efecbd2b1de05d320255ec869dd200736d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 Jan 2019 13:53:57 +0300 Subject: fixes #1788 (occasional crash in Tox) --- protocols/Tox/src/tox_connection.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3