Conf: Fix segfault when there is no value in layout system option.
This commit is contained in:
@@ -276,7 +276,8 @@ conf_layout_section(char *src)
|
|||||||
conf.colors.layout_fg = get_opt(src, "#ffffff", "fg").str;
|
conf.colors.layout_fg = get_opt(src, "#ffffff", "fg").str;
|
||||||
conf.colors.layout_bg = getcolor((get_opt(src, "#000000", "bg").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.layout_system = True;
|
||||||
|
|
||||||
conf.nlayout = get_size_sec(src, "layout");
|
conf.nlayout = get_size_sec(src, "layout");
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ erase_delim_content(char *buf)
|
|||||||
str[j] = ' ';
|
str[j] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user