aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorsylvaintv2012-06-25 00:49:33 +0200
committersylvaintv2012-06-25 00:49:33 +0200
commit20a781c02047cc8e2908e77707115db09a9aa59f (patch)
tree9bf7b712bd515203856003e148a706c9238ea08a /engines
parentc7fd284e4a96686b3dde288c047db8b68a96a408 (diff)
downloadscummvm-rg350-20a781c02047cc8e2908e77707115db09a9aa59f.tar.gz
scummvm-rg350-20a781c02047cc8e2908e77707115db09a9aa59f.tar.bz2
scummvm-rg350-20a781c02047cc8e2908e77707115db09a9aa59f.zip
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"
Diffstat (limited to 'engines')
-rw-r--r--engines/toon/anim.cpp3
1 files changed, 3 insertions, 0 deletions
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;