mirror of https://github.com/odrling/Aegisub
Fix a bug that would cause the program to crash if CSRI was selected as subtitle renderer but no CSRI renderer was actually installed. Patch by Plorkyeran, closes: 462
Originally committed to SVN as r2857.
This commit is contained in:
parent
4dafa0ff10
commit
32eb3a8a62
|
@ -308,8 +308,6 @@ void VideoContext::SetVideo(const wxString &filename) {
|
|||
|
||||
// Get frame
|
||||
frame_n = 0;
|
||||
//UpdateDisplays(true);
|
||||
Refresh(true,true);
|
||||
|
||||
// Show warning
|
||||
wxString warning = provider->GetWarning().c_str();
|
||||
|
@ -389,8 +387,12 @@ void VideoContext::Refresh (bool video, bool subtitles) {
|
|||
// Re-export
|
||||
AssExporter exporter(grid->ass);
|
||||
exporter.AddAutoFilters();
|
||||
try {
|
||||
subsProvider->LoadSubtitles(exporter.ExportTransform());
|
||||
}
|
||||
catch (wxString err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + err,_T("Subtitles provider")); }
|
||||
catch (const wchar_t *err) { wxMessageBox(_T("Error while invoking subtitles provider: ") + wxString(err),_T("Subtitles provider")); }
|
||||
}
|
||||
|
||||
// Jump to frame
|
||||
JumpToFrame(frame_n);
|
||||
|
|
Loading…
Reference in New Issue