Fix crash when a subtitles file is not found
This commit is contained in:
parent
f0ff8c6179
commit
747e34b981
1 changed files with 21 additions and 21 deletions
|
@ -83,6 +83,7 @@ SubsController::SubsController(agi::Context *context)
|
|||
}
|
||||
|
||||
void SubsController::Load(agi::fs::path const& filename, std::string charset) {
|
||||
try {
|
||||
try {
|
||||
if (charset.empty())
|
||||
charset = CharSetDetect::GetEncoding(filename);
|
||||
|
@ -109,7 +110,6 @@ void SubsController::Load(agi::fs::path const& filename, std::string charset) {
|
|||
|
||||
const SubtitleFormat *reader = SubtitleFormat::GetReader(filename, charset);
|
||||
|
||||
try {
|
||||
AssFile temp;
|
||||
reader->ReadFile(&temp, filename, charset);
|
||||
|
||||
|
|
Loading…
Reference in a new issue