aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/video
diff options
context:
space:
mode:
authorTobia Tesan2014-02-07 12:40:59 +0100
committerTobia Tesan2014-10-15 21:36:45 +0200
commitafb3ae303461668d4807eaa047a5585a7c870adc (patch)
tree9a28b03293fad9182f26cdb65023899e6a1b3327 /engines/wintermute/video
parent581aff7f8f0938e71c3c7b8f197269e9a7146f93 (diff)
downloadscummvm-rg350-afb3ae303461668d4807eaa047a5585a7c870adc.tar.gz
scummvm-rg350-afb3ae303461668d4807eaa047a5585a7c870adc.tar.bz2
scummvm-rg350-afb3ae303461668d4807eaa047a5585a7c870adc.zip
WINTERMUTE: Treat edge case - prevents crash if SRT file is blank.
Diffstat (limited to 'engines/wintermute/video')
-rw-r--r--engines/wintermute/video/video_subtitler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp
index f1becb00b3..0ade366fb5 100644
--- a/engines/wintermute/video/video_subtitler.cpp
+++ b/engines/wintermute/video/video_subtitler.cpp
@@ -185,6 +185,12 @@ bool VideoSubtitler::display() {
}
bool VideoSubtitler::update(long frame) {
+
+ if (_subtitles.size() == 0) {
+ // Edge case: we have loaded subtitles early on... from a blank file.
+ return false;
+ }
+
if (frame != _lastSample) {
/*
* If the frame count hasn't advanced the previous state still matches