diff options
author | Filippos Karapetis | 2012-06-16 02:58:26 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-18 05:24:04 +0300 |
commit | 3c04d333f2f6a423a67a8d0202ffca29d22da9db (patch) | |
tree | a55409b9c02c46d1e68547430b0974f7892f764d /engines | |
parent | 1b1b1d6615c4555e133a59c2c221bae65853c1f2 (diff) | |
download | scummvm-rg350-3c04d333f2f6a423a67a8d0202ffca29d22da9db.tar.gz scummvm-rg350-3c04d333f2f6a423a67a8d0202ffca29d22da9db.tar.bz2 scummvm-rg350-3c04d333f2f6a423a67a8d0202ffca29d22da9db.zip |
SCI: Add a check for empty VMD file names
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index f176a13721..fa44a7dc19 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -342,6 +342,12 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { case 6: // Play videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + if (s->_videoState.fileName.empty()) { + // Happens in Lighthouse + warning("kPlayVMD: Empty filename passed"); + return s->r_acc; + } + if (!videoDecoder->loadFile(s->_videoState.fileName)) { warning("Could not open VMD %s", s->_videoState.fileName.c_str()); break; |