diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index da2f01aa..69e1ba1a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2710,7 +2710,7 @@ void MainWindow::onMapRulerStatusChanged(const QString &status) { void MainWindow::moveEvent(QMoveEvent *event) { QMainWindow::moveEvent(event); - if (label_MapRulerStatus->isVisible() && label_MapRulerStatus->parentWidget()) + if (label_MapRulerStatus && label_MapRulerStatus->isVisible() && label_MapRulerStatus->parentWidget()) label_MapRulerStatus->move(label_MapRulerStatus->parentWidget()->mapToGlobal(QPoint(6, 6))); }