diff options
-rw-r--r-- | engines/made/screen.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 754a45016c..a480a3bc0c 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -819,7 +819,13 @@ int16 Screen::addToSpriteList(int16 index, int16 xofs, int16 yofs) { } SpriteListItem Screen::getFromSpriteList(int16 index) { - return _spriteList[index - 1]; + if (index > _spriteList.size()) { + SpriteListItem emptyItem; + emptyItem.index = 0; + return emptyItem; + } else { + return _spriteList[index - 1]; + } } void Screen::clearSpriteList() { |