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

This commit is contained in:
Eugene Sandulenko 2023-03-03 23:44:58 +01:00
parent 9fcb33a5e6
commit 4b24414b1d
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -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;