Browse Source

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
v6.1.6
ed 4 years ago
parent
commit
52fbaa6042
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      modules/juce_audio_devices/native/juce_linux_Midi.cpp

+ 3
- 3
modules/juce_audio_devices/native/juce_linux_Midi.cpp 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()


Loading…
Cancel
Save