From: Steinar H. Gunderson Date: Thu, 6 Dec 2018 17:39:02 +0000 (+0100) Subject: Fix a cleanup issue. X-Git-Tag: 1.8.0~50 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=8ef13cde4979e73002c5af91a8f333c7b3a9d4a7 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. --- 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(); }