From d14a840e5e7cae6b8829c0cd7d65886321bcf3de Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 10 Jan 2020 23:10:36 +0100 Subject: DIRECTOR: Gracefully exit when end of movie list is reached --- engines/director/director.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines') 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, "======================================="); -- cgit v1.2.3