Skip to content

Commit

Permalink
Fix crash on exit due to Librarian of SettingsView not unregistering …
Browse files Browse the repository at this point in the history
…its MidiMessage handlers, causing a crash on exit when the synths were destroyed but more MIDI message being received.
  • Loading branch information
christofmuc committed Aug 15, 2024
1 parent bf9cba3 commit 110fc21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MidiKraft
4 changes: 4 additions & 0 deletions The-Orm/MainComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ MainComponent::~MainComponent()
UIModel::instance()->currentSynth_.removeChangeListener(this);

Logger::setCurrentLogger(nullptr);

// Make sure to destroy the UI before the synths in order to unregister all message handlers
patchView_.reset();
settingsView_.reset();
}

#ifdef USE_SPARKLE
Expand Down

0 comments on commit 110fc21

Please sign in to comment.