diff options
-rw-r--r-- | src/perl/perl-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index 774cd87d..be892983 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -61,7 +61,10 @@ SV *irssi_bless_iobject(int type, int chat_type, void *object) rec = g_hash_table_lookup(iobject_stashes, GINT_TO_POINTER(type | (chat_type << 24))); - g_return_val_if_fail(rec != NULL, newSViv(GPOINTER_TO_INT(object))); + if (rec == NULL) { + /* unknown iobject */ + return newSViv(GPOINTER_TO_INT(object)); + } stash = gv_stashpv(rec->stash, 1); |