[Mplayer-cvslog] CVS: main/libmenu menu.c,1.6,1.7

Arpi of Ize arpi at mplayerhq.hu
Sun Jan 26 17:03:01 CET 2003


Update of /cvsroot/mplayer/main/libmenu
In directory mail:/var/tmp.root/cvs-serv31944

Modified Files:
	menu.c 
Log Message:
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 at dce.chalmers.se>


Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmenu/menu.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- menu.c	28 Dec 2002 13:46:55 -0000	1.6
+++ menu.c	26 Jan 2003 16:02:58 -0000	1.7
@@ -116,8 +116,10 @@
 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;



More information about the MPlayer-cvslog mailing list