mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
fix crash in layout code when encountering wrong config
This commit is contained in:
parent
fef25d6a35
commit
ee3eaa5428
@ -127,6 +127,7 @@ static void sig_layout_restore(void)
|
|||||||
for (; tmp != NULL; tmp = config_node_next(tmp)) {
|
for (; tmp != NULL; tmp = config_node_next(tmp)) {
|
||||||
CONFIG_NODE *node = tmp->data;
|
CONFIG_NODE *node = tmp->data;
|
||||||
|
|
||||||
|
if (node->key == NULL) continue;
|
||||||
window = window_find_refnum(atoi(node->key));
|
window = window_find_refnum(atoi(node->key));
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
window = window_create(NULL, TRUE);
|
window = window_create(NULL, TRUE);
|
||||||
|
@ -179,6 +179,7 @@ static void sig_layout_restore(void)
|
|||||||
lower_window = NULL; lower_size = 0;
|
lower_window = NULL; lower_size = 0;
|
||||||
for (i = 0, tmp = sorted_config; i < windows_count; tmp = tmp->next, i++) {
|
for (i = 0, tmp = sorted_config; i < windows_count; tmp = tmp->next, i++) {
|
||||||
CONFIG_NODE *node = tmp->data;
|
CONFIG_NODE *node = tmp->data;
|
||||||
|
if (node->key == NULL) continue;
|
||||||
|
|
||||||
/* create a new window + mainwindow */
|
/* create a new window + mainwindow */
|
||||||
signal_emit("gui window create override", 1,
|
signal_emit("gui window create override", 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user