--- a/pidgin/plugins/perl/common/GtkIMHtml.xs Mon May 12 22:37:06 2014 +0200 +++ b/pidgin/plugins/perl/common/GtkIMHtml.xs Mon May 12 23:32:00 2014 +0200 @@ -176,7 +176,7 @@ else t_len = 0; - for (i = 0; i <= t_len; i++) { + for (i = 0; i <= t_len && unused; i++) { STRLEN t_sl; t_GL = g_slist_append(t_GL, SvPV(*av_fetch((AV *)SvRV(unused), i, 0), t_sl)); }