mirror of https://github.com/odrling/Aegisub
Fix crash when opening video
If video was previously open and the user chooses to resample the script for the new video, VideoController would try to update the subs for the now-deleted old provider.
This commit is contained in:
parent
e2754bcd90
commit
40ac2f9b44
|
@ -270,6 +270,8 @@ bool Project::DoLoadVideo(agi::fs::path const& path) {
|
|||
return false;
|
||||
}
|
||||
|
||||
AnnounceVideoProviderModified(video_provider.get());
|
||||
|
||||
UpdateVideoProperties(context->ass.get(), video_provider.get(), context->parent);
|
||||
video_provider->LoadSubtitles(context->ass.get());
|
||||
|
||||
|
@ -288,7 +290,6 @@ bool Project::DoLoadVideo(agi::fs::path const& path) {
|
|||
if (agi::fs::HasExtension(path, "mkv"))
|
||||
video_has_subtitles = MatroskaWrapper::HasSubtitles(path);
|
||||
|
||||
AnnounceVideoProviderModified(video_provider.get());
|
||||
AnnounceKeyframesModified(keyframes);
|
||||
AnnounceTimecodesModified(timecodes);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue