diff options
-rw-r--r-- | engines/supernova/screen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/supernova/screen.cpp b/engines/supernova/screen.cpp index 105025e363..1fa112bb05 100644 --- a/engines/supernova/screen.cpp +++ b/engines/supernova/screen.cpp @@ -385,15 +385,15 @@ void Screen::renderImage(ImageId id, bool removeImage) { } void Screen::renderImage(int section) { - if (!_currentImage) - return; - bool removeImage = false; if (section > 128) { removeImage = true; section -= 128; } + if (!_currentImage || section >= kMaxSection) + return; + do { renderImageSection(_currentImage, section, removeImage); section = _currentImage->_section[section].next; |