diff --git a/astro.cpp b/astro.cpp index 7b995c900..bd378f78c 100644 --- a/astro.cpp +++ b/astro.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "commons.h" @@ -56,7 +57,7 @@ Astro::~Astro () void Astro::closeEvent (QCloseEvent * e) { write_settings (); - QWidget::closeEvent (e); + e->ignore (); // do not allow closure by the window system } void Astro::read_settings () diff --git a/mainwindow.cpp b/mainwindow.cpp index e28331ac4..c9910f18e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2051,6 +2051,7 @@ void MainWindow::closeEvent(QCloseEvent * e) m_valid = false; // suppresses subprocess errors m_config.transceiver_offline (); writeSettings (); + m_astroWidget.reset (); m_guiTimer.stop (); m_prefixes.reset (); m_shortcuts.reset ();