output/Control: catch and log StartThread() exceptions

This commit is contained in:
Max Kellermann 2017-10-30 08:39:44 +01:00
parent b6251c6968
commit 55e6629fb4

View File

@ -190,8 +190,14 @@ AudioOutputControl::Open(const AudioFormat audio_format,
request.audio_format = audio_format;
request.pipe = ∓
if (!thread.IsDefined())
StartThread();
if (!thread.IsDefined()) {
try {
StartThread();
} catch (...) {
LogError(std::current_exception());
return false;
}
}
CommandWait(Command::OPEN);
const bool open2 = open;