bugfix: die nicely if no default layout

This commit is contained in:
Julien Danjou 2007-10-05 09:37:40 +02:00
parent d7aac7b811
commit 96e80f1e83
1 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,9 @@ parse_config(Display * disp, int scr, DC * drawcontext, const char *confpatharg,
awesomeconf->layouts[i].arrange = NULL; awesomeconf->layouts[i].arrange = NULL;
} }
if(!awesomeconf->nlayouts) awesomeconf->current_layout = awesomeconf->layouts;
if(!awesomeconf->nlayouts || !awesomeconf->current_layout->arrange)
eprint("awesome: fatal: no default layout available\n"); eprint("awesome: fatal: no default layout available\n");
for(i = 0; i < awesomeconf->nlayouts; i++) for(i = 0; i < awesomeconf->nlayouts; i++)
@ -263,8 +265,6 @@ parse_config(Display * disp, int scr, DC * drawcontext, const char *confpatharg,
awesomeconf->statusbar.width = j; awesomeconf->statusbar.width = j;
} }
awesomeconf->current_layout = awesomeconf->layouts;
/* tags */ /* tags */
conftags = config_lookup(&awesomelibconf, "awesome.tags"); conftags = config_lookup(&awesomelibconf, "awesome.tags");