mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-03 08:41:47 +08:00
Cabana: fix segfault on exit (#26193)
fix segfault on exit
old-commit-hash: d75cbf2338
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
static MainWindow *main_win = nullptr;
|
||||
void qLogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
|
||||
main_win->showStatusMessage(msg);
|
||||
if (main_win) main_win->showStatusMessage(msg);
|
||||
}
|
||||
|
||||
MainWindow::MainWindow() : QWidget() {
|
||||
@@ -118,6 +118,7 @@ void MainWindow::dockCharts(bool dock) {
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
main_win = nullptr;
|
||||
if (floating_window)
|
||||
floating_window->deleteLater();
|
||||
QWidget::closeEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user