Skip to content

Commit

Permalink
Check MidiJack::m_jackAudio before using (LMMS#5907)
Browse files Browse the repository at this point in the history
  • Loading branch information
salilra authored Feb 13, 2021
1 parent 5967bcf commit 4521ec8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/midi/MidiJack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ MidiJack::~MidiJack()
{
if(jackClient())
{
// remove ourselves first (atomically), so we will not get called again
m_jackAudio->removeMidiClient();
if (m_jackAudio) {
// remove ourselves first (atomically), so we will not get called again
m_jackAudio->removeMidiClient();
}

if( jack_port_unregister( jackClient(), m_input_port) != 0){
printf("Failed to unregister jack midi input\n");
Expand Down

0 comments on commit 4521ec8

Please sign in to comment.