[Scummvm-cvs-logs] SF.net SVN: scummvm:[41759] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Jun 22 12:16:47 CEST 2009


Revision: 41759
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41759&view=rev
Author:   drmccoy
Date:     2009-06-22 10:16:45 +0000 (Mon, 22 Jun 2009)

Log Message:
-----------
Unwinding the call stack before unloading the script

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game_v1.cpp
    scummvm/trunk/engines/gob/game_v2.cpp
    scummvm/trunk/engines/gob/script.cpp

Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp	2009-06-22 10:16:17 UTC (rev 41758)
+++ scummvm/trunk/engines/gob/game_v1.cpp	2009-06-22 10:16:45 UTC (rev 41759)
@@ -242,7 +242,8 @@
 	_vm->_inter->_breakFromLevel = oldBreakFrom;
 	_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
 
-	_script->pop();
+	if (_script->isLoaded())
+		_script->pop();
 }
 
 void Game_v1::clearCollisions() {

Modified: scummvm/trunk/engines/gob/game_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v2.cpp	2009-06-22 10:16:17 UTC (rev 41758)
+++ scummvm/trunk/engines/gob/game_v2.cpp	2009-06-22 10:16:45 UTC (rev 41759)
@@ -293,7 +293,8 @@
 	_vm->_inter->_breakFromLevel = oldBreakFrom;
 	_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
 
-	_script->pop();
+	if (_script->isLoaded())
+		_script->pop();
 }
 
 void Game_v2::clearCollisions() {

Modified: scummvm/trunk/engines/gob/script.cpp
===================================================================
--- scummvm/trunk/engines/gob/script.cpp	2009-06-22 10:16:17 UTC (rev 41758)
+++ scummvm/trunk/engines/gob/script.cpp	2009-06-22 10:16:45 UTC (rev 41759)
@@ -343,6 +343,9 @@
 	if (_lomHandle >= 0)
 		_vm->_dataIO->closeData(_lomHandle);
 
+	while (!_callStack.empty())
+		pop();
+
 	delete[] _totData;
 
 	_totData = 0;


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