mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Make sure witem exists
This commit is contained in:
parent
363a79dc7a
commit
7e898fdcf4
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue