[Scummvm-git-logs] scummvm master -> 6c4e6321f370007eb4922dab565ec71645007517
rvanlaar
noreply at scummvm.org
Sat Sep 24 21:53:23 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6c4e6321f3 DIRECTOR: LINGO: Improve frozen context handling
Commit: 6c4e6321f370007eb4922dab565ec71645007517
https://github.com/scummvm/scummvm/commit/6c4e6321f370007eb4922dab565ec71645007517
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-24T23:49:10+02:00
Commit Message:
DIRECTOR: LINGO: Improve frozen context handling
When an error happens during go, for example with a nonexisting movie
the lingo callstack isn't cleaned up properly.
Now the callstack is cleaned up via `popContext(aborting=true)`.
This improves on commit:
DIRECTOR: fix memleak when lingo context is frozen
27b314cb25a786c9ecffcef6bc0589c500257b4d
Changed paths:
engines/director/lingo/lingo.cpp
engines/director/window.cpp
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 51454cd5913..820dfca45d9 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -662,6 +662,10 @@ void Lingo::resetLingo() {
g_director->_wm->removeMenu();
+ while (_vm->getCurrentWindow()->_callstack.size()) {
+ popContext(true);
+ }
+
// TODO
//
// reset the following:
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index cc2efe6b983..01616ba1819 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -78,12 +78,6 @@ Window::~Window() {
}
if (_puppetTransition)
delete _puppetTransition;
-
- for (auto &it: _callstack) {
- delete it;
- }
- delete _retContext;
- delete _retLocalVars;
}
void Window::invertChannel(Channel *channel, const Common::Rect &destRect) {
More information about the Scummvm-git-logs
mailing list