[Scummvm-git-logs] scummvm master -> 78a9ac31985f7a8e087ae7c795ed179d34844238
sev-
noreply at scummvm.org
Thu Jun 29 22:39:28 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:
78a9ac3198 DIRECTOR: Add sanity chacck to Movie destructor
Commit: 78a9ac31985f7a8e087ae7c795ed179d34844238
https://github.com/scummvm/scummvm/commit/78a9ac31985f7a8e087ae7c795ed179d34844238
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-06-30T00:39:23+02:00
Commit Message:
DIRECTOR: Add sanity chacck to Movie destructor
Changed paths:
engines/director/movie.cpp
diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index ac7193f634c..9130d5c263c 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -95,9 +95,11 @@ Movie::Movie(Window *window) {
}
Movie::~Movie() {
- if (_sharedCast)
+ if (_sharedCast && _sharedCast->getArchive())
g_director->_allOpenResFiles.remove(_sharedCast->getArchive()->getPathName());
- g_director->_allOpenResFiles.remove(_cast->getArchive()->getPathName());
+
+ if (_cast && _cast->getArchive())
+ g_director->_allOpenResFiles.remove(_cast->getArchive()->getPathName());
delete _cast;
delete _sharedCast;
More information about the Scummvm-git-logs
mailing list