[Scummvm-git-logs] scummvm master -> f240c049a8cb91cc786906e67b601fd920b674b1
sev-
noreply at scummvm.org
Sun May 10 10:42:38 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
760e57a1c6 DIRECTOR: Added more debug output on movie unloading
f240c049a8 DIRECTOR: Do not reload movie if next movie is set to the same
Commit: 760e57a1c64da016689b64e66b620034bdb3b5bb
https://github.com/scummvm/scummvm/commit/760e57a1c64da016689b64e66b620034bdb3b5bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-10T12:31:55+02:00
Commit Message:
DIRECTOR: Added more debug output on movie unloading
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 75e6c8d9862..75b22e9e38b 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -546,11 +546,13 @@ bool Window::loadNextMovie() {
_currentMovie->_sharedCast = nullptr;
}
- delete _currentMovie;
- _currentMovie = nullptr;
+ if (_currentMovie) {
+ debug(0, "@@@@ Unloading movie '%s' in '%s'", utf8ToPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str());
+
+ delete _currentMovie;
+ _currentMovie = nullptr;
+ }
- Common::Path archivePath = Common::Path(_currentPath, g_director->_dirSeparator);
- archivePath.appendInPlace(Common::lastPathComponent(_nextMovie.movie, g_director->_dirSeparator));
Archive *mov = g_director->openArchive(archivePath);
_nextMovie.movie.clear(); // Clearing it, so we will not attempt to load again
Commit: f240c049a8cb91cc786906e67b601fd920b674b1
https://github.com/scummvm/scummvm/commit/f240c049a8cb91cc786906e67b601fd920b674b1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-10T12:41:26+02:00
Commit Message:
DIRECTOR: Do not reload movie if next movie is set to the same
Fixes startup in jewels1, where a background window is created
for keeping the internal game state. Reloading this movie leads
to use-after-free.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 75b22e9e38b..f6a4ffdbd5c 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -540,6 +540,14 @@ bool Window::loadNextMovie() {
_newMovieStarted = true;
_currentPath = Common::firstPathComponents(_nextMovie.movie, g_director->_dirSeparator);
+ Common::Path archivePath = Common::Path(_currentPath, g_director->_dirSeparator);
+ archivePath.appendInPlace(Common::lastPathComponent(_nextMovie.movie, g_director->_dirSeparator));
+
+ if (_currentMovie && archivePath == _currentMovie->getArchive()->getPathName()) {
+ debug(0, "Window::loadNextMovie: next movie '%s' is the same as current movie, skipping load", archivePath.toString(Common::Path::kNativeSeparator).c_str());
+ return true;
+ }
+
Cast *previousSharedCast = nullptr;
if (_currentMovie) {
previousSharedCast = _currentMovie->getSharedCast();
More information about the Scummvm-git-logs
mailing list