[Scummvm-cvs-logs] SF.net SVN: scummvm: [27809] scummvm/branches/branch-0-10-0/engines/cine/ various.cpp

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Sun Jul 1 02:59:18 CEST 2007


Revision: 27809
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27809&view=rev
Author:   agent-q
Date:     2007-06-30 17:59:18 -0700 (Sat, 30 Jun 2007)

Log Message:
-----------
Fixing bug where object was accessed after it was deleted

Modified Paths:
--------------
    scummvm/branches/branch-0-10-0/engines/cine/various.cpp

Modified: scummvm/branches/branch-0-10-0/engines/cine/various.cpp
===================================================================
--- scummvm/branches/branch-0-10-0/engines/cine/various.cpp	2007-07-01 00:58:22 UTC (rev 27808)
+++ scummvm/branches/branch-0-10-0/engines/cine/various.cpp	2007-07-01 00:59:18 UTC (rev 27809)
@@ -2457,6 +2457,7 @@
 
 void drawOverlays(void) {
 	overlayHeadElement *currentOverlay;
+	overlayHeadElement *nextOverlay;
 
 	backupOverlayPage();
 
@@ -2467,6 +2468,8 @@
 	currentOverlay = currentOverlay->next;
 
 	while (currentOverlay) {
+		nextOverlay = currentOverlay->next;
+
 		switch (currentOverlay->type) {
 		case 0:	// sprite
 			{
@@ -2629,7 +2632,7 @@
 			}
 		}
 
-		currentOverlay = currentOverlay->next;
+		currentOverlay = nextOverlay;
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list