From 59b31a0232a939c3264fc35d6156034139021d4c Mon Sep 17 00:00:00 2001 From: Melissa Goad Date: Sun, 12 Jan 2020 13:47:42 -0600 Subject: [PATCH] Fix adding a sound card --- src/sound/midi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/midi.c b/src/sound/midi.c index 98c5100a0..31a8b86bf 100644 --- a/src/sound/midi.c +++ b/src/sound/midi.c @@ -399,6 +399,7 @@ midi_raw_out_byte(uint8_t val) void midi_clear_buffer(void) { + if (!midi) return; midi->midi_pos = 0; midi->midi_status = 0x00; midi->midi_cmd_pos = 0;