# HG changeset patch # User laaz # Date 1004129302 0 # Node ID c6421946d07c2aa5152fee796391479f92356c2b # Parent e5a6dd35b88e7e17a45f08e2e09fcb00b7e63af6 Fixed segfault if 0 subtitle found in a file. diff -r e5a6dd35b88e -r c6421946d07c mplayer.c --- a/mplayer.c Fri Oct 26 19:54:43 2001 +0000 +++ b/mplayer.c Fri Oct 26 20:48:22 2001 +0000 @@ -607,7 +607,8 @@ ||(0==strcmp(&sub_name[l-4],".UTF")))) sub_utf8=1; subtitles=sub_read_file(sub_name); - if(!subtitles) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name); + if (sub_num == 0) printf ("No subtitles found in %s\n",sub_name); + if(!subtitles || sub_num == 0) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name); } #endif