[Scummvm-git-logs] scummvm master -> 26e203856f492290b25786546d0596919cc7ef4f
mistydemeo
noreply at scummvm.org
Tue Jul 18 22:52:11 UTC 2023
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:
26e203856f DIRECTOR: fully remove old shared cast
Commit: 26e203856f492290b25786546d0596919cc7ef4f
https://github.com/scummvm/scummvm/commit/26e203856f492290b25786546d0596919cc7ef4f
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-07-18T15:45:10-07:00
Commit Message:
DIRECTOR: fully remove old shared cast
When reloading the shared cast, erase the references from both
_allSeenResFiles and _allOpenResFiles. In the case that the shared
cast is reloaded from a different path, this would leave a dangling
reference in _allOpenResFiles. This would then lead to a crash later
when enumerating _allOpenResFiles and trying to access the found
path in _allSeenResFiles.
Fixes a crash in the D4 version of Alice which would occur when loading
the cursor. This occurs since Alice ends up loading first Shared.dir and
then DATA:Shared.dir, leaving a dangling reference to Shared.dir in
_allSeenResFiles.
Issue was introduced in 9aa095873683b990ac85b4c06b5fa843dcbd682a.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 846e04392c5..8cae284277c 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -369,6 +369,7 @@ void Window::loadNewSharedCast(Cast *previousSharedCast) {
// Clean up the previous sharedCast
if (previousSharedCast) {
g_director->_allSeenResFiles.erase(previousSharedCastPath);
+ g_director->_allOpenResFiles.remove(previousSharedCastPath);
delete previousSharedCast;
}
More information about the Scummvm-git-logs
mailing list