diff options
author | Timo Sirainen <cras@irssi.org> | 2002-10-14 11:52:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-10-14 11:52:13 +0000 |
commit | 9ab017b3fa622f623f5fa325721d9da593f4e318 (patch) | |
tree | b57299612288866f716d3405e5937ccbf2c0c678 /src/fe-common/core | |
parent | 42d4598e06040c7564086a3b81d4ad5c511fdf72 (diff) | |
download | irssi-9ab017b3fa622f623f5fa325721d9da593f4e318.zip |
/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
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/windows-layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 4dd1ee32..9429c00a 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -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) |