1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

trigger: fix crash in callback if one regex is NULL (invalid)

This commit is contained in:
Sebastien Helleu
2014-02-08 12:46:34 +01:00
parent f04eb4ae23
commit 7b496197ef
+4
View File
@@ -82,6 +82,10 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
for (i = 0; i < trigger->regex_count; i++)
{
/* if regex is not set (invalid), skip it */
if (!trigger->regex[i].regex)
continue;
ptr_key = (trigger->regex[i].variable) ?
trigger->regex[i].variable :
trigger_hook_regex_default_var[weechat_config_integer (trigger->options[TRIGGER_OPTION_HOOK])];