[Scummvm-git-logs] scummvm branch-2-3 -> b583c4031a8309c010fdfc053fa5664b15b57d0e

bluegr bluegr at gmail.com
Wed Sep 29 22:37:39 UTC 2021


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:
b583c4031a NEVERHOOD: Handle sound 3 when deleting a sound group (bug #12930)


Commit: b583c4031a8309c010fdfc053fa5664b15b57d0e
    https://github.com/scummvm/scummvm/commit/b583c4031a8309c010fdfc053fa5664b15b57d0e
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-09-30T01:37:20+03:00

Commit Message:
NEVERHOOD: Handle sound 3 when deleting a sound group (bug #12930)

It's consistent with how sounds 1 and 2 are handled, and seems to fix
bug #12930, where the game can crash on exit otherwise.

Changed paths:
    engines/neverhood/sound.cpp


diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp
index db22b72289..eb55fde45c 100644
--- a/engines/neverhood/sound.cpp
+++ b/engines/neverhood/sound.cpp
@@ -421,6 +421,11 @@ void SoundMan::deleteSoundGroup(uint32 groupNameHash) {
 		_soundIndex2 = -1;
 	}
 
+	if (_soundIndex3 != -1 && _soundItems[_soundIndex3]->getGroupNameHash() == groupNameHash) {
+		deleteSoundByIndex(_soundIndex3);
+		_soundIndex3 = -1;
+	}
+
 	for (uint index = 0; index < _soundItems.size(); ++index)
 		if (_soundItems[index] && _soundItems[index]->getGroupNameHash() == groupNameHash)
 			deleteSoundByIndex(index);




More information about the Scummvm-git-logs mailing list