Guarding by "hasWebDataServices"

This commit is contained in:
Klaus Basan
2020-02-15 20:36:50 +01:00
committed by Mat Sutcliffe
parent 70e08fdf8b
commit 14ab60cb73
5 changed files with 65 additions and 50 deletions

View File

@@ -47,7 +47,7 @@ namespace BlackCore
CAircraftMatcher::CAircraftMatcher(const CAircraftMatcherSetup &setup, QObject *parent) : QObject(parent), m_setup(setup)
{
if (sApp && !sApp->isShuttingDown())
if (sApp && sApp->hasWebDataServices())
{
sApp->getWebDataServices()->synchronizeDbCaches(CEntityFlags::AircraftCategoryEntity);
const CAircraftCategoryList categories = sApp->getWebDataServices()->getAircraftCategories();
@@ -513,7 +513,8 @@ namespace BlackCore
const CCallsign callsign = inModel.getCallsign();
if (js.isEmpty() && log) { CLogUtilities::addLogDetailsToList(log, callsign, QStringLiteral("Matching script is empty")); }
while (!js.isEmpty() && sApp && !sApp->isShuttingDown())
while (!js.isEmpty() && sApp && sApp->hasWebDataServices())
{
rv.runScript = true;