Fixed crash on change particular sound options

Happened only when there is a current song but it’s not played, for example in title screen
https://forum.zdoom.org/viewtopic.php?t=56631
This commit is contained in:
alexey.lysiuk 2017-05-28 17:18:35 +03:00
parent 9435a09f1e
commit e56cda1350
1 changed files with 6 additions and 1 deletions

View File

@ -363,7 +363,12 @@ public:
void WildMidiSetOption(int opt, int set);
void CreateSMF(TArray<uint8_t> &file, int looplimit=0);
int ServiceEvent();
int GetDeviceType() const override { return MIDI->GetDeviceType(); }
int GetDeviceType() const override
{
return nullptr == MIDI
? MusInfo::GetDeviceType()
: MIDI->GetDeviceType();
}
protected:
MIDIStreamer(const char *dumpname, EMidiDevice type);