summaryrefslogtreecommitdiff
path: root/src/plugins/trigger
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-25 00:21:54 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-26 08:41:44 +0200
commit529a22e342e9195bd0173877e707d74397f55d96 (patch)
tree56c6fb9d00bf630b8f78f978ab36af1240da3853 /src/plugins/trigger
parent828ca37225bcff10d349cd1c65c50417a5e07f0f (diff)
downloadweechat-529a22e342e9195bd0173877e707d74397f55d96.zip
plugins: remove check of NULL pointers before calling weechat_unhook() (issue #865)
Diffstat (limited to 'src/plugins/trigger')
-rw-r--r--src/plugins/trigger/trigger.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index afdb292d8..196f7a221 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -279,8 +279,7 @@ trigger_unhook (struct t_trigger *trigger)
{
for (i = 0; i < trigger->hooks_count; i++)
{
- if (trigger->hooks[i])
- weechat_unhook (trigger->hooks[i]);
+ weechat_unhook (trigger->hooks[i]);
}
free (trigger->hooks);
trigger->hooks = NULL;