Don't continue in case of an evLoadSubtitle error.
authorib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 12 Apr 2018 12:53:41 +0000 (12:53 +0000)
committerib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Thu, 12 Apr 2018 12:53:41 +0000 (12:53 +0000)
Calling update_set_of_subtitles() in case of a sub_read_file() error
would delete the currently used subtitle instead of loading a new one.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38072 b3059339-0415-0410-9bf9-f77b7e298cf2

gui/interface.c

index 41660c2..972294f 100644 (file)
@@ -1420,8 +1420,10 @@ void mplayerLoadSubtitle(const char *name)
 
         subdata = sub_read_file(name, guiInfo.sh_video ? guiInfo.sh_video->fps : 0);
 
-        if (!subdata)
+        if (!subdata) {
             gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name);
+            return;
+        }
     }
 
     update_set_of_subtitles();