[Scummvm-tracker] [ScummVM :: Bugs] #12930: NEVERHOOD: Demo can crash when pressing Esc

ScummVM :: Bugs trac at scummvm.org
Tue Sep 14 09:33:17 UTC 2021


#12930: NEVERHOOD: Demo can crash when pressing Esc
-------------------------+--------------------------------
Reporter:  eriktorbjorn  |       Owner:  (none)
    Type:  defect        |      Status:  new
Priority:  normal        |   Component:  Engine: Neverhood
 Version:                |  Resolution:
Keywords:                |        Game:  The Neverhood
-------------------------+--------------------------------
Comment (by eriktorbjorn):

 It seems that when _gameModule is deleted, it will delete some sounds from
 the sound module.

 Perhaps something like this would work? I'm not sure if it's the correct
 approach, though.

 {{{
 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);
 }}}

 It would be consistent with how it handles _soundIndex1 and _soundIndex2,
 but...
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/12930#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list