Fix segmentation fault on no layout available

This commit is contained in:
Julien Danjou 2008-03-14 07:23:06 +01:00
parent 2b0de43885
commit f797aec81e
1 changed files with 2 additions and 0 deletions

View File

@ -397,7 +397,9 @@ config_parse_screen(cfg_t *cfg, int screen)
else else
{ {
warn("no default layout available\n"); warn("no default layout available\n");
layout = p_new(Layout, 1);
layout->arrange = layout_tile; layout->arrange = layout_tile;
layout_list_push(&virtscreen->layouts, layout);
} }
/* Tags */ /* Tags */