From e7902ae551e829840cab8d077a1d49b690a5963c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 4 Jul 2002 13:18:17 +0000 Subject: [PATCH] Using Irssi::Ignore crashed git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2865 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/perl-common.c | 6 ++++-- 1 file 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);