mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 05:22:07 +08:00
Cabana: fix segfault on exit (#26193)
fix segfault on exit old-commit-hash: d75cbf2338f098a9c2143c94a9db8ddce68699b4
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