check config_new return value

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2014-03-24 09:59:42 -04:00 committed by Allan McRae
parent fb8437b588
commit b0dc547fcb
1 changed files with 4 additions and 1 deletions

View File

@ -1045,7 +1045,10 @@ int main(int argc, char *argv[])
setuseragent();
/* init config data */
config = config_new();
if(!(config = config_new())) {
/* config_new prints the appropriate error message */
cleanup(1);
}
/* disable progressbar if the output is redirected */
if(!isatty(fileno(stdout))) {