Skip to content

Commit

Permalink
DIRECTOR: Lingo: Gracefully return when movie does not exits
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent 4d2e4a8 commit 5e99a98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engines/director/lingo/lingo-funcs.cpp
Expand Up @@ -190,8 +190,10 @@ void Lingo::func_mciwait(Common::String &s) {
}

void Lingo::func_goto(Common::String &frame, Common::String &movie) {
if (!_vm->_movies || !_vm->_movies->contains(movie))
error("Movie %s does not exist", movie.c_str());
if (!_vm->_movies || !_vm->_movies->contains(movie)) {
warning("Movie %s does not exist", movie.c_str());
return;
}

_vm->_currentScore = _vm->_movies->getVal(movie);
_vm->_currentScore->loadArchive();
Expand Down

0 comments on commit 5e99a98

Please sign in to comment.