diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-03 12:35:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-03 12:35:27 +0300 |
commit | e85b4c67372900013faa7793db0f7e664d5bca2e (patch) | |
tree | a30aea519d9c2672ed4a50d32a6ad43acd285497 /protocols/Tox/libtox/src/toxcore/ping.c | |
parent | cb012794fa0ed74ed57607048dcafc6b06419ba7 (diff) |
fixes #2374 (Update libtox to 0.2.12)
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/ping.c')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/ping.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/ping.c b/protocols/Tox/libtox/src/toxcore/ping.c index d2677ee786..305cce47c4 100644 --- a/protocols/Tox/libtox/src/toxcore/ping.c +++ b/protocols/Tox/libtox/src/toxcore/ping.c @@ -364,6 +364,10 @@ Ping *ping_new(const Mono_Time *mono_time, DHT *dht) void ping_kill(Ping *ping) { + if (ping == nullptr) { + return; + } + networking_registerhandler(dht_get_net(ping->dht), NET_PACKET_PING_REQUEST, nullptr, nullptr); networking_registerhandler(dht_get_net(ping->dht), NET_PACKET_PING_RESPONSE, nullptr, nullptr); ping_array_kill(ping->ping_array); |