[Scummvm-git-logs] scummvm branch-2-7 -> 83481850e661cc9096b5faf1621b17541fb280f9

sev- noreply at scummvm.org
Fri Mar 3 22:46:47 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:
83481850e6 AUDIO: Do not crash if MT32 driver is not fully initialized


Commit: 83481850e661cc9096b5faf1621b17541fb280f9
    https://github.com/scummvm/scummvm/commit/83481850e661cc9096b5faf1621b17541fb280f9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:45:33+01:00

Commit Message:
AUDIO: Do not crash if MT32 driver is not fully initialized

Changed paths:
    audio/mt32gm.cpp


diff --git a/audio/mt32gm.cpp b/audio/mt32gm.cpp
index d4500e11e30..626580b717d 100644
--- a/audio/mt32gm.cpp
+++ b/audio/mt32gm.cpp
@@ -973,6 +973,9 @@ void MidiDriver_MT32GM::metaEvent(int8 source, byte type, byte *data, uint16 len
 }
 
 void MidiDriver_MT32GM::stopAllNotes(bool stopSustainedNotes) {
+	if (!_driver)
+		return;
+
 	for (int i = 0; i < MIDI_CHANNEL_COUNT; ++i) {
 		if (!isOutputChannelUsed(i))
 			continue;




More information about the Scummvm-git-logs mailing list