From 40ac2f9b44f2632eef8c9fbe1cba6e92f9e0298d Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 23 May 2014 06:58:46 -0700 Subject: [PATCH] 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. --- src/project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/project.cpp b/src/project.cpp index bb0356f49..e6dfed50d 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -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;