From 2b00fd58b74f8a964c3c58e12bdd2a4466a83a43 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 6 Jul 2003 14:10:42 +0000 Subject: NOTIFYLIST_REC usage crashfix git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3122 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/irc/Irc.xs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/perl/irc/Irc.xs b/src/perl/irc/Irc.xs index d976ce9e..f73a92ff 100644 --- a/src/perl/irc/Irc.xs +++ b/src/perl/irc/Irc.xs @@ -134,8 +134,10 @@ static void perl_notifylist_fill_hash(HV *hv, NOTIFYLIST_REC *notify) hv_store(hv, "idle_check_time", 15, newSViv(notify->idle_check_time), 0); av = newAV(); - for (tmp = notify->ircnets; *tmp != NULL; tmp++) { - av_push(av, new_pv(*tmp)); + if (notify->ircnets != NULL) { + for (tmp = notify->ircnets; *tmp != NULL; tmp++) { + av_push(av, new_pv(*tmp)); + } } hv_store(hv, "ircnets", 7, newRV_noinc((SV*)av), 0); } -- cgit v1.2.3