1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 17:23:15 +02:00

plugins: remove check of NULL pointers before calling weechat_unhook() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-25 00:21:54 +02:00
parent 828ca37225
commit 529a22e342
14 changed files with 34 additions and 71 deletions
+3 -6
View File
@@ -241,12 +241,9 @@ relay_api_free (struct t_relay_client *client)
if (client->protocol_data)
{
if (RELAY_API_DATA(client, hook_signal_buffer))
weechat_unhook (RELAY_API_DATA(client, hook_signal_buffer));
if (RELAY_API_DATA(client, hook_hsignal_nicklist))
weechat_unhook (RELAY_API_DATA(client, hook_hsignal_nicklist));
if (RELAY_API_DATA(client, hook_signal_upgrade))
weechat_unhook (RELAY_API_DATA(client, hook_signal_upgrade));
weechat_unhook (RELAY_API_DATA(client, hook_signal_buffer));
weechat_unhook (RELAY_API_DATA(client, hook_hsignal_nicklist));
weechat_unhook (RELAY_API_DATA(client, hook_signal_upgrade));
free (client->protocol_data);