The attached little patch fixes a core dump on termcap systems when

$TERM is undefined.
Frederick Bruckman <fredb@immanent.net>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8890 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-01-11 12:32:24 +00:00
parent 26908d998b
commit aac74a7785
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ static int success=0;
int load_termcap(char *termtype){
if(!termtype) termtype=getenv("TERM");
if(!termtype) termtype="unknown";
success=tgetent(term_buffer, termtype);
if(success<0){ printf("Could not access the 'termcap' data base.\n"); return 0; }
if(success==0){ printf("Terminal type `%s' is not defined.\n", termtype);return 0;}