fix panic when audio file does not have subtitle

This commit is contained in:
raziman 2021-02-23 21:34:33 +08:00
parent 3b78b676e6
commit 03c4424f1d

View File

@ -211,6 +211,11 @@ func (p *PlayingBar) stop() {
}
func (p *PlayingBar) switchLyrics() {
if len(p.subtitles) == 0 {
return
}
var langIndex int
for i := range p.subtitles {
if p.subtitles[i].langExt == p.langLyric {