diff options
author | Neil Millstone | 2007-07-02 22:42:35 +0000 |
---|---|---|
committer | Neil Millstone | 2007-07-02 22:42:35 +0000 |
commit | c43f68e5540923d04504f1ab3e4c967e04ae6257 (patch) | |
tree | aed21fd845e17300122f60c3545efd8f79449817 /engines | |
parent | fddc9fb3f605863ef39e933996d06f7c14ba61be (diff) | |
download | scummvm-rg350-c43f68e5540923d04504f1ab3e4c967e04ae6257.tar.gz scummvm-rg350-c43f68e5540923d04504f1ab3e4c967e04ae6257.tar.bz2 scummvm-rg350-c43f68e5540923d04504f1ab3e4c967e04ae6257.zip |
Fix bug where an object was accessed after it was deleted in cine engine
svn-id: r27870
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cine/various.cpp | 5 |
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; } } |