From 20a781c02047cc8e2908e77707115db09a9aa59f Mon Sep 17 00:00:00 2001 From: sylvaintv Date: Mon, 25 Jun 2012 00:49:33 +0200 Subject: TOON: Fix bug #3533291 - Crash in Russian Version The Russian-localized version of an animation contained an empty frame, added a check to skip the rendering. Bug #3533291: "TOON: Russian Version Crash at Voice Scanner" --- engines/toon/anim.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/toon') diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 84f6fa375c..a4eb1f210c 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -146,6 +146,9 @@ void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int if (_frames[frame]._ref != -1) frame = _frames[frame]._ref; + if (!_frames[frame]._data) + return; + int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; int32 offsX = 0; -- cgit v1.2.3