summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/perl/perl-common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index be73bd30..a3a599ac 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -420,8 +420,10 @@ static void perl_ignore_fill_hash(HV *hv, IGNORE_REC *ignore)
hv_store(hv, "mask", 4, new_pv(ignore->mask), 0);
hv_store(hv, "servertag", 9, new_pv(ignore->servertag), 0);
av = newAV();
- for (tmp = ignore->channels; *tmp != NULL; tmp++) {
- av_push(av, new_pv(*tmp));
+ if (ignore->channels != NULL) {
+ for (tmp = ignore->channels; *tmp != NULL; tmp++) {
+ av_push(av, new_pv(*tmp));
+ }
}
hv_store(hv, "channels", 8, newRV_noinc((SV*)av), 0);
hv_store(hv, "pattern", 7, new_pv(ignore->pattern), 0);