From 2f8e0175248855f2f0f7ae1b2164553f757d2f78 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 3 Apr 2012 13:39:48 -0400 Subject: PEGASUS: Add safety check around decodeNextFrame() when playing the Bandai logo --- engines/pegasus/pegasus.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3