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:
parent
42d4598e06
commit
9ab017b3fa
@ -136,6 +136,7 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
|
|||||||
CONFIG_NODE *node)
|
CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
CONFIG_NODE *subnode;
|
CONFIG_NODE *subnode;
|
||||||
|
CHAT_PROTOCOL_REC *proto;
|
||||||
const char *type;
|
const char *type;
|
||||||
|
|
||||||
type = module_find_id_str("WINDOW ITEM TYPE", item->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);
|
subnode = config_node_section(node, NULL, NODE_TYPE_BLOCK);
|
||||||
|
|
||||||
iconfig_node_set_str(subnode, "type", type);
|
iconfig_node_set_str(subnode, "type", type);
|
||||||
type = chat_protocol_find_id(item->chat_type)->name;
|
proto = item->chat_type == 0 ? NULL :
|
||||||
iconfig_node_set_str(subnode, "chat_type", type);
|
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);
|
iconfig_node_set_str(subnode, "name", item->visible_name);
|
||||||
|
|
||||||
if (item->server != NULL)
|
if (item->server != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user