aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-10 23:10:36 +0100
committerEugene Sandulenko2020-01-10 23:10:36 +0100
commitd14a840e5e7cae6b8829c0cd7d65886321bcf3de (patch)
treefb8c3a6b98ffaf74b8339e9ba0dc0f9003238640 /engines/director
parenta132d6aa7887a09a43cd550e3d0f6d82776324ce (diff)
downloadscummvm-rg350-d14a840e5e7cae6b8829c0cd7d65886321bcf3de.tar.gz
scummvm-rg350-d14a840e5e7cae6b8829c0cd7d65886321bcf3de.tar.bz2
scummvm-rg350-d14a840e5e7cae6b8829c0cd7d65886321bcf3de.zip
DIRECTOR: Gracefully exit when end of movie list is reached
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/director.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 332b8b5759..14a63db8b6 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -312,6 +312,9 @@ void DirectorEngine::enqueueAllMovies() {
MovieReference DirectorEngine::getNextMovieFromQueue() {
MovieReference res;
+ if (_movieQueue.empty())
+ return res;
+
res.movie = _movieQueue.front();
debug(0, "=======================================");