diff options
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 4bd85905c9..95a7506f8d 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -180,19 +180,23 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { if (movie.type != VOID) { movie.toString(); - Common::File file; - - if (!file.open(*movie.u.s)) { - if (_vm->getPlatform() == Common::kPlatformMacintosh) { - Common::MacResManager resMan; - if (!resMan.open(*movie.u.s)) { - warning("Movie %s does not exist", movie.u.s->c_str()); - return; - } - } else { - warning("Movie %s does not exist", movie.u.s->c_str()); - return; + bool fileExists = false; + + if (_vm->getPlatform() == Common::kPlatformMacintosh) { + Common::MacResManager resMan; + if (resMan.open(*movie.u.s)) { + fileExists = true; } + } else { + Common::File file; + if (file.open(*movie.u.s)) { + fileExists = true; + } + } + + if (!fileExists) { + warning("Movie %s does not exist", movie.u.s->c_str()); + return; } _vm->_nextMovie = *movie.u.s; |