From 16c72ac7badce5ed9b821e69f55a82db14fdb884 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Feb 2019 20:10:15 +0300 Subject: fixes #1852 (crash in libtox) --- protocols/Tox/libtox/src/toxcore/net_crypto.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/Tox/libtox/src/toxcore') diff --git a/protocols/Tox/libtox/src/toxcore/net_crypto.c b/protocols/Tox/libtox/src/toxcore/net_crypto.c index 3ace3beaea..b53146137c 100644 --- a/protocols/Tox/libtox/src/toxcore/net_crypto.c +++ b/protocols/Tox/libtox/src/toxcore/net_crypto.c @@ -3036,6 +3036,9 @@ uint32_t crypto_run_interval(const Net_Crypto *c) /* Main loop. */ void do_net_crypto(Net_Crypto *c, void *userdata) { + if (c == nullptr) // !!!!!!!!!!!!!!!!! + return; + kill_timedout(c, userdata); do_tcp(c, userdata); send_crypto_packets(c); -- cgit v1.2.3