aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cine/various.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 281c4807b8..49b10b6b14 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -2458,6 +2458,7 @@ void drawFailureMessage(byte cmd) {
void drawOverlays(void) {
overlayHeadElement *currentOverlay;
+ overlayHeadElement *nextOverlay;
backupOverlayPage();
@@ -2468,6 +2469,8 @@ void drawOverlays(void) {
currentOverlay = currentOverlay->next;
while (currentOverlay) {
+ nextOverlay = currentOverlay->next;
+
switch (currentOverlay->type) {
case 0: // sprite
{
@@ -2630,7 +2633,7 @@ void drawOverlays(void) {
}
}
- currentOverlay = currentOverlay->next;
+ currentOverlay = nextOverlay;
}
}