AUDIO: Do not crash if MT32 driver is not fully initialized
This commit is contained in:
parent
9fcb33a5e6
commit
4b24414b1d
1 changed files with 3 additions and 0 deletions
|
@ -973,6 +973,9 @@ void MidiDriver_MT32GM::metaEvent(int8 source, byte type, byte *data, uint16 len
|
||||||
}
|
}
|
||||||
|
|
||||||
void MidiDriver_MT32GM::stopAllNotes(bool stopSustainedNotes) {
|
void MidiDriver_MT32GM::stopAllNotes(bool stopSustainedNotes) {
|
||||||
|
if (!_driver)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < MIDI_CHANNEL_COUNT; ++i) {
|
for (int i = 0; i < MIDI_CHANNEL_COUNT; ++i) {
|
||||||
if (!isOutputChannelUsed(i))
|
if (!isOutputChannelUsed(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue