1
mirror of https://github.com/mpv-player/mpv synced 2025-01-01 04:36:24 +01:00

mplayer crashes if one tries to use osd menu without having a font

installed. The patch to menu.c is one way to fix that.
patch by Björn Sandell <biorn@dce.chalmers.se>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9104 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2003-01-26 16:02:58 +00:00
parent 2636e53e9e
commit db1e3c66af

View File

@ -116,8 +116,10 @@ static int menu_parse_config(char* buffer) {
int menu_init(char* cfg_file) {
char* buffer = NULL;
int bl = BUF_STEP, br = 0;
int f;
int fd = open(cfg_file, O_RDONLY);
int f, fd;
if(vo_font == NULL)
return 0;
fd = open(cfg_file, O_RDONLY);
if(fd < 0) {
printf("Can't open menu config file: %s\n",cfg_file);
return 0;