From 110fc217c4ad5632a0e168f8e55699387f5c3195 Mon Sep 17 00:00:00 2001 From: Christof Date: Thu, 15 Aug 2024 14:50:28 +0200 Subject: [PATCH] Fix crash on exit due to Librarian of SettingsView not unregistering its MidiMessage handlers, causing a crash on exit when the synths were destroyed but more MIDI message being received. --- MidiKraft | 2 +- The-Orm/MainComponent.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MidiKraft b/MidiKraft index a19719cd..1b9cf1d6 160000 --- a/MidiKraft +++ b/MidiKraft @@ -1 +1 @@ -Subproject commit a19719cdb3d07d4dfecbf59a1015990599970858 +Subproject commit 1b9cf1d648c329f9aeb773c189c7ada82cb409fe diff --git a/The-Orm/MainComponent.cpp b/The-Orm/MainComponent.cpp index b5ac6fb8..84caced0 100644 --- a/The-Orm/MainComponent.cpp +++ b/The-Orm/MainComponent.cpp @@ -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