diff options
author | Timo Sirainen <cras@irssi.org> | 2001-06-27 23:05:20 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-06-27 23:05:20 +0000 |
commit | c249f625442025738843fad4920ddf97068cf9d5 (patch) | |
tree | d67718db973debe6700414c8a312518dc71fbebc /src/perl/perl-common.c | |
parent | 89d7498019b64ae5f89b6f09f32aaa9d876a9da3 (diff) | |
download | irssi-c249f625442025738843fad4920ddf97068cf9d5.zip |
Don't print GLIB critical when trying to bless unknown iobject - this could
well happen with some unknown objects like /EXEC -interactive's WI_ITEM_REC.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1583 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.c')
-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); |