diff options
author | Strangerke | 2014-02-28 07:32:01 +0100 |
---|---|---|
committer | Strangerke | 2014-02-28 07:32:01 +0100 |
commit | 120bd4c10e1560b1b5f11500ffb1cd41466c9f90 (patch) | |
tree | 23f805a8bf5d4bbf93c15bf8d64161e3d75d1612 /engines | |
parent | 42c159d0174d8097f3b142899895c13c27ca5916 (diff) | |
download | scummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.tar.gz scummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.tar.bz2 scummvm-rg350-120bd4c10e1560b1b5f11500ffb1cd41466c9f90.zip |
BBVS: Add a sanity check in playVideo()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bbvs/videoplayer.cpp | 6 |
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(); |