diff options
author | Paul Gilbert | 2015-04-07 20:09:00 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-04-07 20:09:00 -0500 |
commit | 07c7f5e31a1f1952ebe583a138352e13e45e0c66 (patch) | |
tree | ef71d152cd46d3f7ab5f315d1a74ca78a1d378c2 /engines | |
parent | c8ac76b22bfd676bb72a850a141730022d6d476c (diff) | |
download | scummvm-rg350-07c7f5e31a1f1952ebe583a138352e13e45e0c66.tar.gz scummvm-rg350-07c7f5e31a1f1952ebe583a138352e13e45e0c66.tar.bz2 scummvm-rg350-07c7f5e31a1f1952ebe583a138352e13e45e0c66.zip |
MADS: Fix crash leaving scene after shooting monkey
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/sprites.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index 67d5e20fe5..bc36b5575a 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -399,7 +399,7 @@ void SpriteSets::remove(int idx) { if (idx == SPRITE_SLOTS_MAX_SIZE) { delete _uiSprites; _uiSprites = nullptr; - } else if (idx >= 0) { + } else if (idx >= 0 && idx < (int)size()) { delete (*this)[idx]; if (idx < ((int)size() - 1)) { |