changeset 9103:6c2c74adaebe

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>
author arpi
date Sun, 26 Jan 2003 16:02:58 +0000
parents 048d0a158714
children a0aacfb492a5
files libmenu/menu.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/menu.c	Sun Jan 26 15:55:35 2003 +0000
+++ b/libmenu/menu.c	Sun Jan 26 16:02:58 2003 +0000
@@ -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;