[Scummvm-cvs-logs] scummvm master -> 120bd4c10e1560b1b5f11500ffb1cd41466c9f90

Strangerke Strangerke at scummvm.org
Fri Feb 28 07:33:39 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
120bd4c10e BBVS: Add a sanity check in playVideo()


Commit: 120bd4c10e1560b1b5f11500ffb1cd41466c9f90
    https://github.com/scummvm/scummvm/commit/120bd4c10e1560b1b5f11500ffb1cd41466c9f90
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-27T22:32:01-08:00

Commit Message:
BBVS: Add a sanity check in playVideo()

Changed paths:
    engines/bbvs/videoplayer.cpp



diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp
index 85cc5ed..eb16261 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();
 






More information about the Scummvm-git-logs mailing list