mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
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.
This commit is contained in:
parent
8ef63e0e0d
commit
912f9b7cef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user