[Scummvm-git-logs] scummvm master -> f32cad8c4e0e9900674926e6f5eea321a1dfa54b
AndywinXp
noreply at scummvm.org
Tue Aug 22 11:45:03 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:
f32cad8c4e SCUMM: HE: Fix _sound object deletion
Commit: f32cad8c4e0e9900674926e6f5eea321a1dfa54b
https://github.com/scummvm/scummvm/commit/f32cad8c4e0e9900674926e6f5eea321a1dfa54b
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-08-22T13:44:57+02:00
Commit Message:
SCUMM: HE: Fix _sound object deletion
Changed paths:
engines/scumm/scumm.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index c52b6fe67c9..115d2b8d8af 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -402,6 +402,12 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
ScummEngine::~ScummEngine() {
delete _musicEngine;
+ // Delete the sound object earlier than the actors
+ // for HE games, since in SoundHE::stopAllSounds() we
+ // try dereferencing actors to stop the speaking chore.
+ if (_game.heversion != 0)
+ delete _sound;
+
_mixer->stopAll();
if (_actors) {
@@ -427,7 +433,8 @@ ScummEngine::~ScummEngine() {
delete _versionDialog;
delete _fileHandle;
- delete _sound;
+ if (_game.heversion == 0)
+ delete _sound;
delete _costumeLoader;
delete _costumeRenderer;
More information about the Scummvm-git-logs
mailing list