aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-01-18 19:22:48 +0000
committerMatthew Hoops2011-01-18 19:22:48 +0000
commitda1669c6669b31a3a7dd8cb09019081651b223fc (patch)
treebcb9280fea44392c074f9ec70d06721f2ed5927f
parent58c9e219b676357f9254939f0ad40e44239bb792 (diff)
downloadscummvm-rg350-da1669c6669b31a3a7dd8cb09019081651b223fc.tar.gz
scummvm-rg350-da1669c6669b31a3a7dd8cb09019081651b223fc.tar.bz2
scummvm-rg350-da1669c6669b31a3a7dd8cb09019081651b223fc.zip
MOHAWK: Add a sanity check to waitUntilMovieEnds()
svn-id: r55309
-rw-r--r--engines/mohawk/video.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index c82adade9d..4e1a544730 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -106,6 +106,9 @@ void VideoManager::playMovieCentered(const Common::String &filename, bool clearS
}
void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) {
+ if (videoHandle == NULL_VID_HANDLE)
+ return;
+
bool continuePlaying = true;
while (!_videoStreams[videoHandle].endOfVideo() && !_vm->shouldQuit() && continuePlaying) {