mirror of https://github.com/mpv-player/mpv
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:
parent
26908d998b
commit
aac74a7785
|
@ -79,6 +79,7 @@ static int success=0;
|
||||||
|
|
||||||
int load_termcap(char *termtype){
|
int load_termcap(char *termtype){
|
||||||
if(!termtype) termtype=getenv("TERM");
|
if(!termtype) termtype=getenv("TERM");
|
||||||
|
if(!termtype) termtype="unknown";
|
||||||
success=tgetent(term_buffer, termtype);
|
success=tgetent(term_buffer, termtype);
|
||||||
if(success<0){ printf("Could not access the 'termcap' data base.\n"); return 0; }
|
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;}
|
if(success==0){ printf("Terminal type `%s' is not defined.\n", termtype);return 0;}
|
||||||
|
|
Loading…
Reference in New Issue