mirror of
https://github.com/mpv-player/mpv
synced 2025-01-16 22:37:28 +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:
parent
2636e53e9e
commit
db1e3c66af
@ -116,8 +116,10 @@ static int menu_parse_config(char* buffer) {
|
|||||||
int menu_init(char* cfg_file) {
|
int menu_init(char* cfg_file) {
|
||||||
char* buffer = NULL;
|
char* buffer = NULL;
|
||||||
int bl = BUF_STEP, br = 0;
|
int bl = BUF_STEP, br = 0;
|
||||||
int f;
|
int f, fd;
|
||||||
int fd = open(cfg_file, O_RDONLY);
|
if(vo_font == NULL)
|
||||||
|
return 0;
|
||||||
|
fd = open(cfg_file, O_RDONLY);
|
||||||
if(fd < 0) {
|
if(fd < 0) {
|
||||||
printf("Can't open menu config file: %s\n",cfg_file);
|
printf("Can't open menu config file: %s\n",cfg_file);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user