From 8ef13cde4979e73002c5af91a8f333c7b3a9d4a7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 6 Dec 2018 18:39:02 +0100 Subject: [PATCH] Fix a cleanup issue. In newer Qt, evidently when using the close button on the window (not when calling close() as a result of a menu item!), the GLWidgets' contexts will be gone by the time app.exec() returns, preventing us from doing proper cleanup. Do the mixer cleanup in closeEvent() instead, fixing the issue. --- nageru/main.cpp | 2 -- nageru/mainwindow.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nageru/main.cpp b/nageru/main.cpp index d5654a5..410a6c4 100644 --- a/nageru/main.cpp +++ b/nageru/main.cpp @@ -119,8 +119,6 @@ int main(int argc, char *argv[]) } int rc = app.exec(); - global_mixer->quit(); - mainWindow.mixer_shutting_down(); delete global_mixer; ImageInput::shutdown_updaters(); return rc; diff --git a/nageru/mainwindow.cpp b/nageru/mainwindow.cpp index 11e6391..d0d9b6c 100644 --- a/nageru/mainwindow.cpp +++ b/nageru/mainwindow.cpp @@ -1548,6 +1548,8 @@ void MainWindow::closeEvent(QCloseEvent *event) } analyzer->hide(); + global_mixer->quit(); + mixer_shutting_down(); event->accept(); } -- 2.39.2