aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-04-03 13:39:48 -0400
committerMatthew Hoops2012-04-03 13:39:48 -0400
commit2f8e0175248855f2f0f7ae1b2164553f757d2f78 (patch)
tree80cccc56714b21f60e4f553722dfa23cd5e3d6ca
parentd5341b2fc7a43d63c38e72d671053d28de42e156 (diff)
downloadscummvm-rg350-2f8e0175248855f2f0f7ae1b2164553f757d2f78.tar.gz
scummvm-rg350-2f8e0175248855f2f0f7ae1b2164553f757d2f78.tar.bz2
scummvm-rg350-2f8e0175248855f2f0f7ae1b2164553f757d2f78.zip
PEGASUS: Add safety check around decodeNextFrame() when playing the Bandai logo
-rw-r--r--engines/pegasus/pegasus.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 46aea7328b..e863626266 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -292,8 +292,11 @@ void PegasusEngine::runIntro() {
while (!shouldQuit() && !video->endOfVideo() && !skipped) {
if (video->needsUpdate()) {
const Graphics::Surface *frame = video->decodeNextFrame();
- _system->copyRectToScreen((byte *)frame->pixels, frame->pitch, 0, 0, frame->w, frame->h);
- _system->updateScreen();
+
+ if (frame) {
+ _system->copyRectToScreen((byte *)frame->pixels, frame->pitch, 0, 0, frame->w, frame->h);
+ _system->updateScreen();
+ }
}
Input input;