diff --git a/src/sound/musicformats/music_midistream.cpp b/src/sound/musicformats/music_midistream.cpp index 1a47f3c2b8..e23c03a3c1 100644 --- a/src/sound/musicformats/music_midistream.cpp +++ b/src/sound/musicformats/music_midistream.cpp @@ -641,7 +641,7 @@ void MIDIStreamer::Callback(void *userdata) void MIDIStreamer::Update() { - if (!MIDI->Update()) Stop(); + if (MIDI != nullptr && !MIDI->Update()) Stop(); } //==========================================================================