diff options
Diffstat (limited to 'src/perl/perl-common.c')
-rw-r--r-- | src/perl/perl-common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c index dcda3bb5..d7a428e5 100644 --- a/src/perl/perl-common.c +++ b/src/perl/perl-common.c @@ -351,10 +351,12 @@ void perl_window_item_fill_hash(HV *hv, WI_ITEM_REC *item) g_return_if_fail(item != NULL); type = (char *) module_find_id_str("WINDOW ITEM TYPE", item->type); - chat_type = (char *) chat_protocol_find_id(item->chat_type)->name; (void) hv_store(hv, "type", 4, new_pv(type), 0); - (void) hv_store(hv, "chat_type", 9, new_pv(chat_type), 0); + if (item->chat_type) { + chat_type = (char *) chat_protocol_find_id(item->chat_type)->name; + (void) hv_store(hv, "chat_type", 9, new_pv(chat_type), 0); + } if (item->server != NULL) { (void) hv_store(hv, "server", 6, iobject_bless(item->server), 0); |