mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Unwinding the call stack before unloading the script
svn-id: r41759
This commit is contained in:
parent
648139dda7
commit
850203fc73
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -343,6 +343,9 @@ void Script::unloadTOT() {
|
||||
if (_lomHandle >= 0)
|
||||
_vm->_dataIO->closeData(_lomHandle);
|
||||
|
||||
while (!_callStack.empty())
|
||||
pop();
|
||||
|
||||
delete[] _totData;
|
||||
|
||||
_totData = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user