From 227190ab426d72121bcb0b2cc92b13c08e68eda5 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 21 Aug 2016 22:43:29 +0200 Subject: [PATCH] Minor adjustments * ignore empty root dir * check for empty context --- src/blackgui/components/modelmatcherlogcomponent.cpp | 2 +- src/blackmisc/simulation/xplane/xplaneutil.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blackgui/components/modelmatcherlogcomponent.cpp b/src/blackgui/components/modelmatcherlogcomponent.cpp index 6abb25af2..70c3c9ee6 100644 --- a/src/blackgui/components/modelmatcherlogcomponent.cpp +++ b/src/blackgui/components/modelmatcherlogcomponent.cpp @@ -66,7 +66,7 @@ namespace BlackGui void CModelMatcherLogComponent::ps_updateCallsignCompleter() { - if (!sGui || !sGui->getIContextNetwork()->isConnected()) { return; } + if (!sGui || !sGui->getIContextNetwork() || sGui->getIContextNetwork()->isEmptyObject() || !sGui->getIContextNetwork()->isConnected()) { return; } const QStringList callsigns = sGui->getIContextNetwork()->getAircraftInRangeCallsigns().toStringList(false); QCompleter *completer = ui->le_Callsign->completer(); diff --git a/src/blackmisc/simulation/xplane/xplaneutil.cpp b/src/blackmisc/simulation/xplane/xplaneutil.cpp index 872449b55..3cddd83e5 100644 --- a/src/blackmisc/simulation/xplane/xplaneutil.cpp +++ b/src/blackmisc/simulation/xplane/xplaneutil.cpp @@ -104,6 +104,7 @@ namespace BlackMisc QStringList CXPlaneUtil::xplaneModelDirectories() { + if (xplaneRootDir().isEmpty()) { return QStringList(); } return QStringList({ xplaneRootDir() }); }