diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2015-01-07 04:12:55 +0100 |
---|---|---|
committer | Ailin Nemui <ailin@linux.site> | 2015-02-17 09:50:55 +0100 |
commit | ee3eaa5428c7a574ad3d34602230f3168f204414 (patch) | |
tree | 11f4ab716f1b886b1e47389eb36c73025b9c2cba /src | |
parent | fef25d6a35d23f885937b087ed7642b327279df5 (diff) | |
download | irssi-ee3eaa5428c7a574ad3d34602230f3168f204414.zip |
fix crash in layout code when encountering wrong config
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/windows-layout.c | 1 | ||||
-rw-r--r-- | src/fe-text/mainwindows-layout.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index d0606bc9..8ebcc12d 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -127,6 +127,7 @@ static void sig_layout_restore(void) for (; tmp != NULL; tmp = config_node_next(tmp)) { CONFIG_NODE *node = tmp->data; + if (node->key == NULL) continue; window = window_find_refnum(atoi(node->key)); if (window == NULL) window = window_create(NULL, TRUE); diff --git a/src/fe-text/mainwindows-layout.c b/src/fe-text/mainwindows-layout.c index c53f8f72..020969e6 100644 --- a/src/fe-text/mainwindows-layout.c +++ b/src/fe-text/mainwindows-layout.c @@ -179,6 +179,7 @@ static void sig_layout_restore(void) lower_window = NULL; lower_size = 0; for (i = 0, tmp = sorted_config; i < windows_count; tmp = tmp->next, i++) { CONFIG_NODE *node = tmp->data; + if (node->key == NULL) continue; /* create a new window + mainwindow */ signal_emit("gui window create override", 1, |