aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-02-28 07:32:01 +0100
committerStrangerke2014-02-28 07:32:01 +0100
commit120bd4c10e1560b1b5f11500ffb1cd41466c9f90 (patch)
tree23f805a8bf5d4bbf93c15bf8d64161e3d75d1612
parent42c159d0174d8097f3b142899895c13c27ca5916 (diff)
downloadscummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.tar.gz
scummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.tar.bz2
scummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.zip
BBVS: Add a sanity check in playVideo()
-rw-r--r--engines/bbvs/videoplayer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp
index 85cc5ed544..eb162612f2 100644
--- a/engines/bbvs/videoplayer.cpp
+++ b/engines/bbvs/videoplayer.cpp
@@ -44,7 +44,11 @@ void BbvsEngine::playVideo(int videoNum) {
}
Video::VideoDecoder *videoDecoder = new Video::AVIDecoder();
- videoDecoder->loadFile(videoFilename);
+ if (!videoDecoder->loadFile(videoFilename)) {
+ delete videoDecoder;
+ warning("Unable to open video %s", videoFilename);
+ return;
+ }
videoDecoder->start();