summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-21 20:10:15 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-21 20:10:15 +0300
commit16c72ac7badce5ed9b821e69f55a82db14fdb884 (patch)
tree2a90137ff80cff051a2a7ac7ec375aae669f193f /protocols/Tox/libtox
parent1d21cf23ef838c54a2f22cbe5fbac10d38d1f9cc (diff)
fixes #1852 (crash in libtox)
Diffstat (limited to 'protocols/Tox/libtox')
-rw-r--r--protocols/Tox/libtox/src/toxcore/net_crypto.c3
1 files changed, 3 insertions, 0 deletions
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);