From ff897997d6f9a29168000244b37eed76ab6aa855 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 20 Feb 2018 12:20:18 +0200 Subject: [PATCH] Fixed hang when TiMidity++ executable failed to launch https://forum.zdoom.org/viewtopic.php?t=59539 --- src/sound/mididevices/music_timiditypp_mididevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sound/mididevices/music_timiditypp_mididevice.cpp b/src/sound/mididevices/music_timiditypp_mididevice.cpp index 42733ce385..a254776ec0 100644 --- a/src/sound/mididevices/music_timiditypp_mididevice.cpp +++ b/src/sound/mididevices/music_timiditypp_mididevice.cpp @@ -692,6 +692,10 @@ bool TimidityPPMIDIDevice::FillStream(SoundStream *stream, void *buff, int len, } break; } + else if (r == 0 && errno != 0) + { + break; + } got += r; } while(got < len); if(got < len)