don't restore bogon termios struct on setupterm failure #1778

pull/1785/head
nick black 3 years ago
parent 48876b42fb
commit cf60ff5b94
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1061,7 +1061,11 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
int termerr;
if(setupterm(opts->termtype, ret->ttyfd, &termerr) != OK){
fprintf(stderr, "Terminfo error %d (see terminfo(3ncurses))\n", termerr);
goto err;
drop_signals(ret);
pthread_mutex_destroy(&ret->statlock);
pthread_mutex_destroy(&ret->pilelock);
free(ret);
return NULL;
}
const char* shortname_term = termname();
// const char* longname_term = longname();

Loading…
Cancel
Save