aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2012-06-16 02:58:26 +0300
committerFilippos Karapetis2012-06-18 05:24:04 +0300
commit3c04d333f2f6a423a67a8d0202ffca29d22da9db (patch)
treea55409b9c02c46d1e68547430b0974f7892f764d /engines
parent1b1b1d6615c4555e133a59c2c221bae65853c1f2 (diff)
downloadscummvm-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.cpp6
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;