mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-02 15:38:59 +00:00
MADS: Add a sanity check in pollActiveChannel()
This avoids a crash when Rex is knocked unconscious in scene 318
This commit is contained in:
parent
ede08b748a
commit
a197d91df6
@ -413,6 +413,10 @@ void ASound::pollActiveChannel() {
|
||||
if (--_activeChannelPtr->_activeCount <= 0) {
|
||||
for (;;) {
|
||||
byte *pSrc = chan->_pSrc;
|
||||
if (!chan->_ptr1) {
|
||||
warning("pollActiveChannel(): No data found for sound channel");
|
||||
break;
|
||||
}
|
||||
if (!(*pSrc & 0x80) || (*pSrc <= 0xF0)) {
|
||||
if (updateFlag)
|
||||
updateActiveChannel();
|
||||
|
Loading…
Reference in New Issue
Block a user