diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index adb0a1451..ee014c8d6 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -669,6 +669,7 @@ namespace BlackCore if (this->m_setupReader) { this->m_setupReader->gracefulShutdown(); + this->m_setupReader.reset(); } this->m_fileLogger->close(); @@ -934,6 +935,7 @@ namespace BlackCore CUrlList CApplication::getVatsimMetarUrls() const { + if (this->m_shutdown) { return CUrlList(); } if (this->m_webDataServices) { const CUrlList urls(this->m_webDataServices->getVatsimMetarUrls()); @@ -948,6 +950,7 @@ namespace BlackCore CUrlList CApplication::getVatsimDataFileUrls() const { + if (this->m_shutdown) { return CUrlList(); } if (this->m_webDataServices) { const CUrlList urls(this->m_webDataServices->getVatsimDataFileUrls()); diff --git a/src/blackcore/vatsim/vatsimmetarreader.cpp b/src/blackcore/vatsim/vatsimmetarreader.cpp index 0359c6f00..3e62a3691 100644 --- a/src/blackcore/vatsim/vatsimmetarreader.cpp +++ b/src/blackcore/vatsim/vatsimmetarreader.cpp @@ -79,6 +79,7 @@ namespace BlackCore void CVatsimMetarReader::readMetars() { + if (this->isAbandoned()) { return; } this->threadAssertCheck(); this->restartTimer(true); // when timer active, restart so we cause no undesired reads