From 1d6f2f90c6b51a43ed3b6d00e474ae9f95f631e4 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 30 Jul 2007 04:05:45 +0000 Subject: [PATCH] Issue #446 - Fixed some crashing while trying to play video without audio loaded, on posix Originally committed to SVN as r1463. --- aegisub/video_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/video_context.cpp b/aegisub/video_context.cpp index 4e9e05ba3..bf63fd5ce 100644 --- a/aegisub/video_context.cpp +++ b/aegisub/video_context.cpp @@ -741,7 +741,7 @@ void VideoContext::OnPlayTimer(wxTimerEvent &event) { JumpToFrame(nextFrame); // Sync audio - if (keepAudioSync && nextFrame % 10 == 0) { + if (keepAudioSync && nextFrame % 10 == 0 && audio && audio->provider && audio->player) { __int64 audPos = audio->GetSampleAtMS(VFR_Output.GetTimeAtFrame(nextFrame)); __int64 curPos = audio->player->GetCurrentPosition(); int delta = int(audPos-curPos);