summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:09:01 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-03-25 14:09:01 +0100
commita5b00ec9793b0a8a20074ffb801615c347e66709 (patch)
treef6902ed6cbd1461ca685dda8f53ef06ca67ccb3f /src
parent97ca653a433f2455cf9c829cd4ac81d48b358874 (diff)
downloadweechat-a5b00ec9793b0a8a20074ffb801615c347e66709.zip
trigger: check that regex pointers are not NULL in function "trigger_regex_free"
Diffstat (limited to 'src')
-rw-r--r--src/plugins/trigger/trigger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index 485fda2c2..9d624dcdd 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -482,6 +482,9 @@ trigger_regex_free (int *regex_count, struct t_trigger_regex **regex)
{
int i;
+ if (!regex_count || !regex)
+ return;
+
if (*regex_count > 0)
{
for (i = 0; i < *regex_count; i++)