summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-04-08 20:55:37 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-04-08 20:55:37 +0200
commitb6b78df3d26886e215638345868ced321e222fe0 (patch)
treee6bd29e84352ca40ba880ae4a7c8cb940b5b0fe7 /src/plugins
parent4da5647e9fd76c28b60af4f59fba9b26ae6174cc (diff)
downloadweechat-b6b78df3d26886e215638345868ced321e222fe0.zip
trigger: check that trigger is not NULL in functions trigger_rename and trigger_copy
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/trigger/trigger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index 0377c7119..744c4b20b 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -1092,7 +1092,7 @@ trigger_rename (struct t_trigger *trigger, const char *name)
int length, i;
char *option_name;
- if (!name || !name[0] || !trigger_name_valid (name)
+ if (!trigger || !name || !name[0] || !trigger_name_valid (name)
|| trigger_search (name))
{
return 0;
@@ -1144,7 +1144,7 @@ trigger_rename (struct t_trigger *trigger, const char *name)
struct t_trigger *
trigger_copy (struct t_trigger *trigger, const char *name)
{
- if (!name || !name[0] || !trigger_name_valid (name)
+ if (!trigger || !name || !name[0] || !trigger_name_valid (name)
|| trigger_search (name))
{
return NULL;