1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

Linux: Stop MidiInputThread before freeing handle in AlsaClient destructor

When immediately closing a MidiInput after starting, the ALSA handle may be closed whilst the MidiInputThread is running and it polls a destroyed handle
This commit is contained in:
ed 2021-03-29 15:21:14 +01:00
parent 79fbde7099
commit 52fbaa6042

View file

@ -51,13 +51,13 @@ public:
jassert (instance != nullptr);
instance = nullptr;
if (handle != nullptr)
snd_seq_close (handle);
jassert (activeCallbacks.get() == 0);
if (inputThread)
inputThread->stopThread (3000);
if (handle != nullptr)
snd_seq_close (handle);
}
static String getAlsaMidiName()