From 676b372ac5e89cfbe100abb6f75676e2482490f4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 11 Jul 2024 18:10:39 +0200 Subject: [PATCH] FP8: tear down GUI before terminating event loop This fixes an issue on Windows, where UI::run can dispatch a signal that ends up via cross-thread channel at the surfaces' BaseUI::request_handler. causing a segfault. --- libs/surfaces/faderport8/faderport8.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 47d78afb9a..5adf517607 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -244,8 +244,6 @@ FaderPort8::~FaderPort8 () AudioEngine::instance()->unregister_port (_output_port); _output_port.reset (); } - - tear_down_gui (); } /* **************************************************************************** @@ -266,6 +264,7 @@ FaderPort8::do_request (FaderPort8Request* req) void FaderPort8::stop () { + tear_down_gui (); DEBUG_TRACE (DEBUG::FaderPort8, "BaseUI::quit ()\n"); BaseUI::quit (); close (); // drop references, disconnect from session signals