Conf: Fix segfault when there is no value in layout system option.

This commit is contained in:
Martin Duquesnoy 2009-09-15 17:00:08 +02:00
parent 74d103a714
commit dc03eb8aa5
2 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,8 @@ conf_layout_section(char *src)
conf.colors.layout_fg = get_opt(src, "#ffffff", "fg").str;
conf.colors.layout_bg = getcolor((get_opt(src, "#000000", "bg").str));
if(strcmp(get_opt(src, "menu", "system").str, "menu") == 0)
if((tmp = get_opt(src, "menu", "system").str) && !strcmp(tmp, "menu"))
conf.layout_system = True;
conf.nlayout = get_size_sec(src, "layout");

View File

@ -48,7 +48,6 @@ erase_delim_content(char *buf)
str[j] = ' ';
}
return str;
}