Unwinding the call stack before unloading the script

svn-id: r41759
This commit is contained in:
Sven Hesse 2009-06-22 10:16:45 +00:00
parent 648139dda7
commit 850203fc73
3 changed files with 7 additions and 2 deletions

View File

@ -242,7 +242,8 @@ void Game_v1::playTot(int16 skipPlay) {
_vm->_inter->_breakFromLevel = oldBreakFrom;
_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
_script->pop();
if (_script->isLoaded())
_script->pop();
}
void Game_v1::clearCollisions() {

View File

@ -293,7 +293,8 @@ void Game_v2::playTot(int16 skipPlay) {
_vm->_inter->_breakFromLevel = oldBreakFrom;
_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
_script->pop();
if (_script->isLoaded())
_script->pop();
}
void Game_v2::clearCollisions() {

View File

@ -343,6 +343,9 @@ void Script::unloadTOT() {
if (_lomHandle >= 0)
_vm->_dataIO->closeData(_lomHandle);
while (!_callStack.empty())
pop();
delete[] _totData;
_totData = 0;