diff options
author | Robert Špalek | 2009-11-06 16:48:37 +0000 |
---|---|---|
committer | Robert Špalek | 2009-11-06 16:48:37 +0000 |
commit | 881bf37554b1d33b3c77bf7a6718b98c7766fd83 (patch) | |
tree | 5c75ea0c24b6bc06a48e0081a7ad59b6c134e4cd /engines/draci/animation.cpp | |
parent | 10d1288c7253a965b9aa94813f25fdb3bffc10d7 (diff) | |
download | scummvm-rg350-881bf37554b1d33b3c77bf7a6718b98c7766fd83.tar.gz scummvm-rg350-881bf37554b1d33b3c77bf7a6718b98c7766fd83.tar.bz2 scummvm-rg350-881bf37554b1d33b3c77bf7a6718b98c7766fd83.zip |
Add safe-guard against collision of animation IDs.
When debugging another issue, I preloaded all animations, and horrible things
happened that I debugged for a few hours.
svn-id: r45695
Diffstat (limited to 'engines/draci/animation.cpp')
-rw-r--r-- | engines/draci/animation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index 2bbb960fb1..674e2473df 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -63,6 +63,9 @@ void Animation::setLooping(bool looping) { } void Animation::markDirtyRect(Surface *surface) const { + if (getFrameCount() == 0) + return; + // Fetch the current frame's rectangle Drawable *frame = _frames[_currentFrame]; Common::Rect frameRect = frame->getRect(_displacement); |