Don't die if the terminal cannot be detected

This commit is contained in:
Přemysl Eric Janouch 2015-02-22 20:49:31 +01:00
parent 6c30579882
commit 68627ddb5e
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ init_terminal (void)
if ((g_terminal.stdout_is_tty = isatty (STDOUT_FILENO)))
tty_fd = STDOUT_FILENO;
if (tty_fd == -1 || setupterm (NULL, tty_fd, NULL) == ERR)
int err;
if (tty_fd == -1 || setupterm (NULL, tty_fd, &err) == ERR)
return;
// Make sure all terminal features used by us are supported