From 3c04d333f2f6a423a67a8d0202ffca29d22da9db Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 16 Jun 2012 02:58:26 +0300 Subject: SCI: Add a check for empty VMD file names --- engines/sci/engine/kvideo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines') 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; -- cgit v1.2.3