[Scummvm-git-logs] scummvm master -> f440529512cc4252d4cbf63b07ab4263331b7d67
rvanlaar
noreply at scummvm.org
Sat Sep 17 21:53:27 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:
f440529512 DIRECTOR: only cleanup sharedcast when it exists
Commit: f440529512cc4252d4cbf63b07ab4263331b7d67
https://github.com/scummvm/scummvm/commit/f440529512cc4252d4cbf63b07ab4263331b7d67
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-17T23:51:57+02:00
Commit Message:
DIRECTOR: only cleanup sharedcast when it exists
Fixes segfault when the sharedcast was a nullptr.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 9a85be8c894..39521e2e02b 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -338,13 +338,15 @@ bool Window::step() {
_currentMovie->_sharedCast = sharedCast;
} else {
// clear reference in openResFile before deleting shared cast
- g_director->_openResFiles.erase(sharedCast->getArchive()->getPathName());
+ if (sharedCast)
+ g_director->_openResFiles.erase(sharedCast->getArchive()->getPathName());
delete sharedCast;
_currentMovie->loadSharedCastsFrom(sharedCastPath);
}
} else {
// clear reference in openResFile before deleting shared cast
- g_director->_openResFiles.erase(sharedCast->getArchive()->getPathName());
+ if (sharedCast)
+ g_director->_openResFiles.erase(sharedCast->getArchive()->getPathName());
delete sharedCast;
}
More information about the Scummvm-git-logs
mailing list