Skip to content

Commit

Permalink
Fix MidiJack crash on exit
Browse files Browse the repository at this point in the history
* Fix uninitialized m_jackClient being used in MidiJack destructor
* Fix destruction order in Mixer.cpp so that MidiJack doesn't access the
  deleted AudioJack instance

Fixes #4688
  • Loading branch information
lukas-w committed Mar 10, 2019
1 parent cdd1ddb commit 17e87c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Mixer.cpp
Expand Up @@ -186,8 +186,8 @@ Mixer::~Mixer()
}
delete m_fifo;

delete m_audioDev;
delete m_midiClient;
delete m_audioDev;

for( int i = 0; i < 3; i++ )
{
Expand Down
1 change: 1 addition & 0 deletions src/core/midi/MidiJack.cpp
Expand Up @@ -61,6 +61,7 @@ static void JackMidiShutdown(void *arg)

MidiJack::MidiJack() :
MidiClientRaw(),
m_jackClient( nullptr ),
m_input_port( NULL ),
m_output_port( NULL ),
m_quit( false )
Expand Down

0 comments on commit 17e87c1

Please sign in to comment.