1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/LAYOUT SAVE doesn't crash anymore with /EXEC -interactives

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2945 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-10-14 11:52:13 +00:00 committed by cras
parent 42d4598e06
commit 9ab017b3fa

View File

@ -136,6 +136,7 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
CONFIG_NODE *node)
{
CONFIG_NODE *subnode;
CHAT_PROTOCOL_REC *proto;
const char *type;
type = module_find_id_str("WINDOW ITEM TYPE", item->type);
@ -145,8 +146,10 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
subnode = config_node_section(node, NULL, NODE_TYPE_BLOCK);
iconfig_node_set_str(subnode, "type", type);
type = chat_protocol_find_id(item->chat_type)->name;
iconfig_node_set_str(subnode, "chat_type", type);
proto = item->chat_type == 0 ? NULL :
chat_protocol_find_id(item->chat_type);
if (proto != NULL)
iconfig_node_set_str(subnode, "chat_type", proto->name);
iconfig_node_set_str(subnode, "name", item->visible_name);
if (item->server != NULL)