- fixed: MIDIStreamer::Update did not check if the device was still valid.

Stopping a song can delete device while the streamer is still valid.
This commit is contained in:
Christoph Oelckers 2017-03-13 00:38:59 +01:00
parent 439e4f9f94
commit f9bb64a5f3

View file

@ -641,7 +641,7 @@ void MIDIStreamer::Callback(void *userdata)
void MIDIStreamer::Update() void MIDIStreamer::Update()
{ {
if (!MIDI->Update()) Stop(); if (MIDI != nullptr && !MIDI->Update()) Stop();
} }
//========================================================================== //==========================================================================