From c5496ff12feabcc0fa76032c6c7fde6d9c74dcc6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 9 Dec 2018 20:21:04 +0300 Subject: hopefully fixes #1610 (Caught a crash (Tox?)) --- protocols/Tox/src/tox_connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/Tox/src/tox_connection.cpp b/protocols/Tox/src/tox_connection.cpp index a175126a9a..fef16834c8 100644 --- a/protocols/Tox/src/tox_connection.cpp +++ b/protocols/Tox/src/tox_connection.cpp @@ -72,8 +72,9 @@ void CToxProto::OnToxCheck(void *arg, BYTE) void CToxProto::OnToxPoll(void *arg, BYTE) { CToxProto *proto = (CToxProto*)arg; + if (proto->m_tox) + tox_iterate(proto->m_tox, arg); - tox_iterate(proto->m_tox, arg); /*uint32_t interval = tox_iteration_interval(proto->m_tox); interval = interval ? interval -- cgit v1.2.3