From da1669c6669b31a3a7dd8cb09019081651b223fc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 18 Jan 2011 19:22:48 +0000 Subject: MOHAWK: Add a sanity check to waitUntilMovieEnds() svn-id: r55309 --- engines/mohawk/video.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) { -- cgit v1.2.3