aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mads/sprites.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index 83f01430eb..cd838f7dfb 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -212,8 +212,9 @@ void SpriteSlots::fullRefresh(bool clearAll) {
void SpriteSlots::deleteTimer(int seqIndex) {
for (uint idx = 0; idx < size(); ++idx) {
- if ((*this)[idx]._seqIndex == seqIndex) {
- remove_at(idx);
+ SpriteSlot &slot = (*this)[idx];
+ if (slot._seqIndex == seqIndex) {
+ slot._flags = IMG_ERASE;
return;
}
}