Fix crash in main window destruction.

This commit is contained in:
John Preston 2020-10-01 17:45:25 +03:00
parent b08fa069b4
commit c4dfc634d0

View file

@ -705,6 +705,17 @@ void MainWindow::launchDrag(std::unique_ptr<QMimeData> data) {
MainWindow::~MainWindow() {
_title.destroy();
// Otherwise:
// ~QWidget
// QWidgetPrivate::close_helper
// QWidgetPrivate::setVisible
// QWidgetPrivate::hide_helper
// QWidgetPrivate::hide_sys
// QWindowPrivate::setVisible
// QMetaObject::activate
// Window::MainWindow::handleVisibleChanged on a destroyed MainWindow.
hide();
}
} // namespace Window