mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Make sure witem exists
This commit is contained in:
parent
363a79dc7a
commit
7e898fdcf4
@ -155,7 +155,9 @@ static void cmd_cat(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||
return;
|
||||
}
|
||||
|
||||
target = g_hash_table_lookup(optlist, "window") != NULL ? item->name : NULL;
|
||||
target = item != NULL && g_hash_table_lookup(optlist, "window") != NULL
|
||||
? item->name
|
||||
: NULL;
|
||||
|
||||
g_io_channel_set_encoding(handle, NULL, NULL);
|
||||
g_io_channel_seek_position(handle, fpos, G_SEEK_SET, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user