From 792c8ec66ebdc069801bf29bd6209833e9ec0115 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 22 Apr 2010 01:09:16 +0000 Subject: [PATCH] Specifically catch exceptions thrown by the subtitle renderer so that we can give a slightly more useful error message. Originally committed to SVN as r4238. --- aegisub/src/video_context.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/src/video_context.cpp b/aegisub/src/video_context.cpp index 0674e5a2f..b72d63d7d 100644 --- a/aegisub/src/video_context.cpp +++ b/aegisub/src/video_context.cpp @@ -411,7 +411,12 @@ AegiVideoFrame VideoContext::GetFrame(int n,bool raw) { // Raster subtitles if available/necessary if (!raw && subsProvider) { tempFrame.CopyFrom(frame); - subsProvider->DrawSubtitles(tempFrame,VFR_Input.GetTimeAtFrame(n,true,true)/1000.0); + try { + subsProvider->DrawSubtitles(tempFrame,VFR_Input.GetTimeAtFrame(n,true,true)/1000.0); + } + catch (...) { + wxLogError(L"Subtitle rendering for the current frame failed.\n"); + } return tempFrame; }